#include<bits/stdc++.h>
using namespace std;
#include<vector>
#include<queue>
#define ll long long
#define inf INT_MAX
double d[3110][3110];
double a[3100];
/*
double solve (ll int i,ll int n,ll int s,ll int p2)
{
	//	cout<<"a";
	if(i==n)
	return 1.0;
	else
	{
		if(d[i][                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             n]!=0)
		return d[i][p2];
		else
		{
		if(s==p2)
		d[i][p2]=a[i]*solve(i+1,n,s,p2);
		else
		{
			d[i][p2]=a[i]*solve(i+1,n,s,p2)+(1.0-a[i])*solve(i+1,n,s,p2+1);
		}
	}
}
return  d[i][p2];
	
}*/
main()
{
ll int n;
cin>>n;
for(int i=0;i<3100;i++)
for(int j=0;j<=3100;j++)
  d[i][j]=0.0;
//cout<<d[44][44];
for(int i=0;i<n;i++)
{

cin>>a[i];
//cout<<a[i];
}
//ll int s=n/2;
//cout<<fixed<<setprecision(10)<<solve(0.0,n,s,0.0);

for(int i=1;i<=n;i++)
{
	if(i==1)
	{
	  d[1][0]=a[0];
      d[1][1]=1-a[0];
	}
	else
	{
		for(int j=0;j<=i;j++)
		{
			if(j==0)
			{
				d[i][j]=d[i-1][j]*(a[i-1]);
			}
			else
			{
				d[i][j]=d[i-1][j-1]*(1-a[i-1])+d[i-1][j]*(a[i-1]);
			}
			
		}
	}

}
/*for(int i=1;i<=n;i++)
{
	cout<<i<<endl;
for(int j=0;j<=i;j++)
cout<<d[i][j]<<" ";
cout<<endl;}*/
double  sum=0;
//cout<<d[n-1][0];
for(int i=0;i<=n/2;i++)
{
	sum=sum+d[n][i];
	//cout<<d[n][i]<<" ";
}
//cout<<endl;

cout<<fixed<<setprecision(12)<<sum<<endl;
}


Measured memory_bytes: 75648