#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here
	setprecision(30);
	int n,i,j;
	cin>>n;
	double p[n];
	for(i=0;i<n;i++)cin>>p[i];
	double dp[n+1][n+1],ans=0.0;
	dp[1][0]=1.0-p[0];
	dp[1][1]=p[0];
	for(i=2;i<=n;i++)
	{
		for(j=0;j<=i;j++)
		{
			dp[i][j]=dp[i-1][j]*(1.0-p[i-1]);
			if(j>0)dp[i][j]+=dp[i-1][j-1]*p[i-1];
		}
	}
	for(i=n/2+1;i<=n;i++)ans+=dp[n][i];
	printf("%0.15lf\n",ans);
	return 0;
	
}