//problem link: 


#include<bits/stdc++.h>

#define PI 3.1415926535897932384626
#define fo(i,n) for(i=0;i<n;i++)
#define Fo(i,a,b) for(i=a;i<b;i++)
#define ll long long
#define pb push_back
#define popb pop_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define ini(a) memset(a,-1,sizeof(a))
#define M (long long)(1e9+7)

#define chk(a) cout << endl << #a << " : " << a << endl
#define chk2(a,b) cout << endl << #a << " : " << a << "\t" << #b << " : " << b << endl
#define chk3(a,b,c) cout << endl << #a << " : " << a << "\t" << #b << " : " << b << "\t" << #c << " : " << c << endl
#define chk4(a,b,c,d) cout << endl << #a << " : " << a << "\t" << #b << " : " << b << "\t" << #c << " : " << c << "\t" << #d << " : " << d << endl


using namespace std;

typedef pair<int, int>	pi;
typedef pair<int,pi>    pii;
typedef pair<ll, ll>	pl;
typedef pair<ll,pl>     pll;
typedef vector<int>		vi;
typedef vector<ll>		vl;
typedef vector<pi>		vpi;
typedef vector<pii>     vpii;
typedef vector<pl>		vpl;
typedef vector<pll>     vpll;
typedef vector<vi>		vvi;
typedef vector<vl>		vvl;
//----------------------------------------------------------------------
//----------------------------------------------------------------------



/*void solv_for(){

	ll n,i,j;
	cin>>n;
	vector<double> p(n+1);
	double prod_head[n+1];
	double prod_tail[n+1];
	prod_head[0]=1;
    prod_tail[0]=1;
	for(i=1;i<=n;i++){
		cin>>p[i];
		prod_head[i]=( p[i]*prod_head[i-1] );
		prod_tail[i]=( (1-p[i])*prod_tail[i-1] );
		chk2(prod_head[i],prod_tail[i]);
	}
	double dp_head[n+1][n+1],dp_tail[n+1][n+1];
	double dp[n+1][n+1];
	dp[0][1]=1-p[0];
	dp[1][0]=p[0];
	for(i=1;i<=n;i++){
		for(j=1;j<=min(n,n-i);j++){
			dp[i][j]=dp[i-1][j]*p[i]+dp[i][j-1]*(i-p[j]);
		}
	}
	ll x;
	dp_head[0][0]=1;dp_tail[0][0]=1;
	for(i=1;i<=n;i++){
		dp_head[0][i]=prod_tail[i];
		dp_tail[0][i]=prod_head[i];
	}
	for(i=1;i<=n;i++){
		for( x=1;x<=min(n,i);x++){
			dp_head[x][i]=dp_head[x-1][i-1]*p[i]*dp_tail[i-x][i-1];
			dp_tail[x][i]=dp_tail[x-1][i-1]*(1-p[i])*dp_head[i-x][i-1];
			cout<<x<<" "<<i;
			chk2(dp_head[x][i],dp_tail[x][i]);
			if(dp_head[x][i]>1){cout<<"blunder\n";}
			
		}
	}
	double sum=0;
	for(j=n/2+1;j<=n;j++){
		sum+=dp_head[j][n]*dp_tail[n-j][n];
	}
	cout<<sum;
	

}
*/
void solve(){

	ll n,i,x;
	cin>>n;
	vector<double> p(n+1);
	double prod_head[n+1];
	double prod_tail[n+1];
	prod_head[0]=1.0;
    prod_tail[0]=1.0;
	for(i=1;i<=n;i++){
		cin>>p[i];
		prod_head[i]=( p[i]*prod_head[i-1] );
		prod_tail[i]=( (1-p[i])*prod_tail[i-1] );
	//	chk2(prod_head[i],prod_tail[i]);
	}
	double dp_head[n+1][n+1];
	dp_head[0][0]=1;
	for(i=1;i<=n;i++){
		for(x=0;x<=min(n,i);x++){
			if(x==0){dp_head[x][i]=prod_tail[i];continue;}
			dp_head[x][i]=(dp_head[x-1][i-1]*p[i]);
			if(x<=i-1){
				dp_head[x][i]+=(dp_head[x][i-1]*(1-p[i]));
			}
			//ll offset=
			//chk2(x,i);
			//chk3(x,i,dp_head[x][i]);
		}
	}
	//dp_head[x][i]=dp_head[x-1][i-1]*p[i]+(i>=2)*dp_head[x-1][i-2]*(i-p[i-1])*p[i];
	double sum=0;
	for(i=n/2+1;i<=n;i++){
		sum+=dp_head[i][n];
	}
	cout<<fixed<<setprecision(20)<<sum;
}



int main(){

#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
#endif

	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	ll t=1;
	//cin>>t;
	while(t--){
		solve();
	}
return 0;
}

Measured memory_bytes: 49860