#include<bits/stdc++.h>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<queue>
#include<deque>
#include<list>
#include<set>
#include<map>
#include<vector>
#include<iostream>
#define re register
//#define inf 0x7f7f7f7f
#define inl inline
#define sqr(x) ((x)*(x))
#define ls (x<<1)
#define rs (x<<1|1)
#define mp(a,b) make_pair((a),(b))
#define debug printf("***************\n");
//#define ls (x<<1)
//#define rs (x<<1|1)
// #pragma comment(linker, "/STACK:1024000000,1024000000")
// #pragma GCC optimize (2)
// #pragma G++ optimize (2)
using namespace std;
typedef int ll;
typedef pair<ll,ll> pll;
typedef double dou;
const ll mod=1e9+7;
//const ll base;
const ll MAXN=50+5;
// const ll MAXM;
const dou eps=1e-8;
ll gcd(ll x,ll y) {while(y^=x^=y^=x%=y);return x;}
// inl char gc() {
// static char buf[1000000],*p1=buf,*p2=buf;
// return p1==p2&&(p2=(p1=buf)+fread(buf,1,1000000,stdin),p1==p2)?EOF:*p1++;
// }
inl char gc() {
return getchar();
}
inl ll read() {
re ll x = 0; re int f = 1;
re char ch = gc();
while(ch<'0'||ch>'9') { if(ch== '-' ) f = -1; ch = gc(); }
while(ch>='0'&&ch<='9') {x=(x<<1)+(x<<3)+(ch^48);ch=gc();}
return x * f;
}
inl ll readx() {
re ll x=0; re int f=1;
re char ch=gc();
while(ch<'0'||ch>'9') { if(ch== '-' ) f = -1; ch = gc(); }
return ch^48;
}
inl char readc() {
re char ch=gc();
while((ch<'A'||ch>'Z')&&(ch<'a'||ch>'z')) ch=gc();
return ch;
}
void write(ll x){
if(x>9)write(x/10);
putchar(x%10+'0');
}
inl void writel(ll x) {
if(x<0) {x=-x;putchar('-');}
write(x); putchar(' ');
}
inl void writeln(ll x){
if(x<0) {x=-x;putchar('-');}
write(x); puts("");
}
inl void FR() {
freopen(".in","r",stdin);
freopen(".out","w",stdout);
}
inl void FC() {
fclose(stdin);
fclose(stdout);
}
double x[MAXN],y[MAXN];
double p[MAXN];
double cj(double x1,double y1,double x2,double y2) {
return (x1 * y2 - y1 * x2);
}
int main() {
// FR();
ll n=read();
for(re ll i=1;i<=n;i++) {
cin>>x[i]>>y[i]>>p[i];
}
double ans=0;
for(re ll i=1;i<=n;i++) {
for(re ll j=1;j<=n;j++) {
if(i!=j) {
double s=cj(x[i],y[i],x[j],y[j])*p[i]*p[j];
for(re ll k=1;k<=n;k++) {
if(k!=i&&k!=j) {
if(cj(x[k]-x[i],y[k]-y[i],x[j]-x[i],y[j]-y[i])<=eps) {//在右侧
s=s*(1.0-p[k]);
}
}
}
ans=ans+s;
}
}
}
cout<<fixed<<setprecision(10)<<abs(ans/2)<<endl;
int a=1;
// FC();
return 0;
}
/*
*/