/*
            In our headlights
            Staring, bleak
            Beer cans
            Deer's eyes
            On the asphalt
            Underneath
            Our crushed plans
            And my lies
            Lonely street signs
            Power lines
            They keep on flashing
            Flashing by
            And we keep driving into the night
            It's a late goodbye
            Such a late goodbye
            And we keep driving into the night
            It's a late goodbye
            Your breath
            Hot upon my cheek
            And we crossed
            That line
            You made me strong
            When I was feeling weak
            And we crossed
            That one time
            Screaming stop signs
            Staring wild eyes
            Keep on flashing
            Flashing by
            And we keep driving into the night
            It's a late goodbye
            Such a late goodbye
            And we keep driving into the night
            It's a late goodbye
            The devil grins from ear to ear when he sees the hand he's dealt us
            Points at your flaming hair and then we're playin' hide and seek
            I can't breathe easy here 'less our trail's gone cold behind us
            'til in the john mirror you stare at yourself grown old and weak
            We keep driving into the night
            It's a late goodbye
            Such a late goodbye
            And we keep driving into the night
            It's a late goodbye
            Such a late goodbye
            And we keep driving into the night
            It's a late goodbye
            Such a late goodbye
            And we keep driving into the night
            It's a late goodbye
            Such a late goodbye
            And we keep driving into the night
            It's a late goodbye
            Such a late goodbye
            And we keep driving into the night...
*/

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

typedef long long ll;
typedef long double ld;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<long long> vll;
typedef vector<vll> vvll;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<pair<long long,long long> > vpll;
typedef vector<vector<pair<ll,ll> > > vvpll;
typedef vector<bool> vb;
typedef vector<vb> vvb;
 
#define FIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define all(x) x.begin() , x.end()
#define pb push_back
#define bs binary_search
#define lb lower_bound
#define ub upper_bound
#define mp make_pair
#define F first
#define S second
#define left (node << 1)
#define right (node << 1) + 1
#define pii pair<int,int> 
#define mii map<int,int>
#define vi vector<int>
#define umii unordered_map<int,int>
#define mod1 998244353
#define mod2 1000000007
#define trace1(x)                cerr<<#x<<": "<<x<<endl
#define trace2(x, y)             cerr<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
#define trace3(x, y, z)          cerr<<#x<<": " <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
#define FILL(name,val) memset(name , val , sizeof(name))
#define repo(i,o,e) for(int i = o ; i < e ; i++)
#define rep(n) for(int i = 0 ; i < n ; i++)
const ll sz = 2e5+5;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
 
const ll inf = 1000LL * 1000LL * 1000LL * 1000LL * 1000LL * 1000LL;

void solve(){
    int n;
    cin >> n;
    vector<double> dp(n+1);
    dp[0] = 1;
    rep(n){
		double p_heads;
		cin >> p_heads;
		for(int j = i+1 ; j >= 0 ; j--){
			dp[j] = (j == 0 ? 0 : dp[j-1] * p_heads) + dp[j] * (1 - p_heads); 
		}	
	}
	double ans = 0;
	repo(i,n/2,n){
		ans += dp[i+1];
	}
	cout << setprecision(10) << ans << endl;
    return;
}

int main(){
    FIO;
    int t = 1;
    // cin >> t;
    while(t--){
        solve();
    }
    return 0;
}


Measured memory_bytes: 256