#include<bits/stdc++.h>

using namespace std;

vector<double >vp;
double dp[3010][3010];
bool visit[3010][3010];
int n;

int dp2[3010][3010];

int dpp2(int i,int x)

{
  if(i==n)
  return 1;

  if(dp2[i][x]!=-1)
  return dp2[i][x];
  int ans=0;
  if(x+1<(n-x-1))
   ans+=dpp2(i+1,x+1);
   ans+=dpp2(i+1,x);


   return dp2[i][x]=ans;
}
double dpp(int i ,int x)
{

  if(i==vp.size())
  return 1;
  if(visit[i][x])
  return dp[i][x];
  visit[i][x]=1;
 int y;
  double ans=0;
    if(x+1<(n-x-1))
   y=dpp2(i+1,x+1);
  if(x+1<(n-x-1))
  ans+=((1-vp[i])*(dpp(i+1,x+1)));


 y=dpp2(i+1,x);

  ans+=((vp[i])*(dpp(i+1,x)));



  return dp[i][x]=ans;


}

int main()
{

 memset(dp2,-1,sizeof dp2);
 cin>>n;
    for(int i=1;i<=n;i++)
    {

        double x;
        cin>>x;
        vp.push_back(x);
    }
    cout <<dpp(0,0);


}
