#include <bits/stdc++.h>
 
#define ld long double
#define ll long long
#define ull unsigned long long
#define MOD 1000000007
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)


using namespace std;

#define for_list(a) for(auto i:a)
#define f(s,a) for(int i=0;i<s;i++) cin>>a[i]

void start(){
    cout << " DEBUG START "<<endl;
}
void end(){
    cout << " END " << endl;
}

ll power(ll a,ll b){
    ll s;
    if(b == 0)
        return 1;
    if(b == 1)
        return a;
    if(b%2 == 0){
        s = power(a,b/2);
        return ((s%MOD)*(s%MOD))%MOD;
    }
    else{
        s = power(a,(b-1)/2);
        return (((a%MOD)*((s%MOD)*(s%MOD)))%MOD)%MOD;
    }
}

int randomize(){
    return (rand()%10000);
} 

ll modInverse(ll a, ll m) 
{ 
    ll m0 = m; 
    ll y = 0, x = 1;  
    if (m == 1) 
      return 0; 
    while (a > 1) 
    {
        ll q = a / m; 
        ll t = m; 
        m = a % m, a = t; 
        t = y; 
        y = x - q * y; 
        x = t; 
    } 
    if (x < 0) 
       x += m0; 
    return x; 
} 
int binarySearch(int arr[], int l, int r, int x) 
{ 
    if (r >= l) { 
        int mid = l + (r - l) / 2; 
        if (arr[mid] == x) 
            return mid; 
        if (arr[mid] > x) 
            return binarySearch(arr, l, mid - 1, x); 
        return binarySearch(arr, mid + 1, r, x); 
    } 
    return -1; 
}
void swap(int *x, int *y) 
{ 
    int temp = *x; 
    *x = *y; 
    *y = temp; 
} 
std::vector<std::vector<int>> v(100005);
int b[100005];
bool visited[100005];

void dfs(int i){
    visited[i] = true;
    for(int j:v[i]){
        if(!visited[j])
            dfs(j);
    }
}
bool bfs(int i){
    if(visited[i])
        return true;
    queue<int> p;
    visited[i] = true;
    b[i] = 1;
    p.push(i);
    while(!p.empty()){
        for(int l:v[p.front()])
        {
            if(!visited[l])
            {
                b[l] = b[p.front()]^1;
                visited[l] = true;
                p.push(l);
            }
            else{
                if(b[l] == b[p.front()]) return false;
            }
        }
        p.pop();
    }
    return true;
}
double dp1[3001][3001];
double dp2[3001][3001];
int main()
{
    FAST;

    clock_t clock_t2,clock_t1 = clock();
    srand(time(NULL));
    // #ifndef ONLINE_JUDGE
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    // #endif
    cout <<fixed;
    cout << setprecision(9);

    for (int i = 0; i < 3001; ++i)
    {
        fill(dp1[i],dp1[i]+3001,0);
    }
    int k;cin >> k;
    double a[k+1];
    for (int i = 0; i < k; ++i)
    {
        cin >> a[i];
    }
    for (int i = 0; i < k; ++i)
    {
        dp1[i][0] = 0;
    }
    dp1[1][0] = 1-a[0];
    dp1[1][1] = a[0];
    for (int i = 2; i <= k; ++i)
    {
        for (int j = 0; j <= k; ++j)
        {
            if(j == 0){
                dp1[i][j] = dp1[i][j] + dp1[i-1][j]*(1-a[i-1]);
            }
            else
                dp1[i][j] = dp1[i][j] + dp1[i-1][j]*(1-a[i-1]) + dp1[i-1][j-1]*a[i-1];
        }
    } 
    // for (int i = 0; i <=k; ++i)
    // {
    //     for (int j = 0; j <= k; ++j)
    //     {
    //         cout << dp1[i][j] << " ";
    //     }
    //     cout << endl;
    // }
    double ans = 0;
    for (int i = k/2+1; i <= k; ++i)
    {
        ans += dp1[k][i];
    }
    cout << ans << endl;

    clock_t2 = clock();
    float seconds = clock_t2-clock_t1;
    seconds = seconds/CLOCKS_PER_SEC;
    cerr << "time taken :" << seconds << endl;
}

Measured memory_bytes: 73728