#include <bits/stdc++.h>
const int N=3005;
int n;
double p[N],dp[N][N],ans;
int main(){
	scanf("%d",&n);
	for (int i=1;i<=n;i++) scanf("%lf",&p[i]);
	dp[0][0]=1;
	for (int i=1;i<=n;i++)
		for (int j=0;j<=i;j++){
			if (j) dp[i][j]+=dp[i-1][j-1]*p[i];
			dp[i][j]+=dp[i-1][j]*(1-p[i]); 
		}
	for (int i=(n+1)/2;i<=n;i++)
		ans=ans+dp[n][i];
	printf("%.10lf",ans); 
}