#include<cstdio>
#define N 3005
#define ld double
int n;
ld p[N],dp[N][N];
int main(){
	scanf("%d",&n);
	for(int i=0;i<n;++i)scanf("%lf",&p[i]);
	dp[0][0]=1;
	for(int i=0;i<n;++i)for(int j=0;j<=n;++j){
		dp[i+1][j]+=dp[i][j]*(1-p[i]);
		if(j+1<=n)dp[i+1][j+1]+=dp[i][j]*p[i];
	}
	ld ans=0;
	for(int i=0;i<=n;++i)if(i>=n-i)ans+=dp[n][i];
	printf("%.10f\n",ans);
	return 0;
}