//#pragma GCC optimize "trapv"
//-D_GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
#define pm(m) for(auto itr=(m).begin();itr!=(m).end();itr++){itr->first<<" "<<itr->second<<"\n";}
// #define int long long int
#define all(x) x.begin(),x.end()
#define allr(x) x.rbegin(),x.rend()
#define ii pair<int,int>
#define Max 100000+5
#define IO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define f first
#define s second
#define pb push_back
#define bug(x) cout<<(x)<<" ";exit(0);
int mod = 1000000007;
int mod1 = 998244353;
vector<int> g[Max];
bool vis[Max];
int d, x, y;
int gcd(int a,int b){
    if(b==0)return a;
    return gcd(b,a%b);
}
void ex(int A, int B) {
    if(B == 0) {
        d = A;
        x = 1;
        y = 0;
    }
    else {
        ex(B, A%B);
        int temp = x;
        x = y;
        y = temp - (A/B)*y;
    }
}





int power(int a,int b){
    if(b==1)return a;
    if(a>mod)a%=mod;
    int r=1;
    while(b){
        if(b&1)r=r%mod*a%mod;
        a=a%mod*a%mod;
        b/=2;
    }
    return r;
}
class uf{
    vector<int> v;
    vector<int> sz;
    
    
    public :
    uf(int n){
        v.resize(n+1);
        iota(v.begin()+1,v.end(),1);
        sz.resize(n+1,1);
        //1 to sz
    }
    int root(int b){
        while(v[b]!=b){
            b = v[b];
        }   
        return b;
    }
    void u(int a, int b){
        //combine a and b
        
        int ra=root(a);
        int rb=root(b);
        if(ra==rb)return ;
        if(sz[ra]<sz[rb]){
            v[ra] = v[rb];
            sz[rb]+=sz[ra];
        }else{
            v[rb]=v[ra];
            sz[ra]+=sz[rb];
        }
    }
    bool f(int a,int b){
        //same set
        return (root(a)==root(b));
    }
   
    
};
vector<int> matmul(vector<int> a,vector<int> b){
    vector<int> c(4,0);
    c[0] = (a[0]%mod*b[0]%mod + a[1]%mod*b[2]%mod)%mod;
    c[1] = (a[0]%mod*b[1]%mod + a[1]%mod*b[3]%mod)%mod;
    c[2] = (a[2]%mod*b[0]%mod + a[3]%mod*b[2]%mod)%mod;
    c[3] = (a[2]%mod*b[1]%mod + a[3]%mod*b[3]%mod)%mod;
    return c;
}
vector<int> id={1,0,0,1};

int n;
vector<double> v(3000),h(3000),t(3000);
vector< vector<double> > dp(3000,vector<double> (3000,-1.0));
double solve(int i,int heads){
    // cout<<i<<" "<<heads<<"\n";
    if(i>n){
        if(heads==0)return 1.0;
        else return 0.0;
    }
    int len = n-i+1;
    if(heads>len)return 0.0;
    if(dp[i][heads]!=-1.0)return dp[i][heads];
    double ans=0.0;
    if(heads==0){
        dp[i][heads] = t[i];
        return dp[i][heads];
    }
    if(heads==len){
        dp[i][heads] = h[i];
        return dp[i][heads];
    }
    ans = v[i]*solve(i+1,heads-1)+(1.0-v[i])*solve(i+1,heads);
    dp[i][heads] = ans;
    // cout<<"Value for "<<i<<" "<<heads<<fixed<<setprecision(9)<<ans<<"\n";
    return ans;
}
int32_t main(){
    
	IO
	//freopen("input.txt","r",stdin);
    	//freopen("output.txt","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++)cin>>v[i];
    h[n] = v[n];
    t[n] = 1.0-v[n];
    for(int i=n-1;i>=1;i--){
        h[i] = v[i]*h[i+1];
        t[i] = (1.0-v[i])*t[i+1];
    }
    double ans=0.0;
    for(int i=(n/2+1);i<=n;i++)
        ans+=solve(1,i);
    cout<<fixed<<setprecision(10)<<ans<<"\n";
    // for(int i=1;i<=3;i++){
    //     for(int j=1;j<=2;j++)cout<<fixed<<setprecision(5)<<dp[i][j]<<" ";
    //     cout<<endl;
    // }
    
	
}

Measured memory_bytes: 76840