#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;cin>>N;double p[N],DP[N+1][N+1],sum=0;
  for(int i=0;i<N;i++)cin>>p[i];DP[0][0]=1;
  for(int i=1;i<=N;i++){
    DP[i][0]=DP[i-1][0]*(1-p[i-1]);DP[i][i]=DP[i-1][i-1]*p[i-1];
    for(int j=1;j<i;j++)DP[i][j]=DP[i-1][j-1]*p[i-1]+DP[i-1][j]*(1-p[i-1]);
  }
  for(int i=(N+1)/2;i<=N;i++)sum+=DP[N][i];
  printf("%.10lf\n",sum);
}