#pragma GCC optimize("03")
/*
name:       Cursed_Angel
MSG:        Hello World I am Cursed Angel
*/

#include <bits/stdc++.h>
#include <iostream>

using namespace std;

//-------------------------------------------------------//
#define rep(i,a,b) for (ll i = (a), _b = (b); i <= _b; i++)
#define repr(i,a,b) for (int i = (a), _b = (b); i >= _b; i--)
#define lp(i,n) for (int i = 0, _n = (n); i < _n; i++)
#define lpr(i,n) for (int i = (n) - 1; ~i; i--)
#define foreach(it, ar) for ( typeof(ar.begin()) it = ar.begin(); it != ar.end(); it++ )
//-------------------------------------------------------------------------------------//

#define clr(ar, val) memset(ar, val, sizeof(ar))
//----------------------------------------------//
#define inn freopen("in.in","r",stdin)
#define outt freopen("out.out","w",stdout)
#define PI 3.1415926535897932385
#define ll long long
#define ull unsigned long long
#define mp make_pair
#define pb push_back
#define pob pop_back
#define bit(n) (1<<(n))
#define Last(i) ( (i) & (-i) )
#define all(v) ((v).begin()), ((v).end())
#define sq(x) ((x) * (x))
#define INF INT_MAX
#define Ios ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);

//-------------------------------------------------------------//
#ifndef DEBUG
#define debug(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1)
{
    cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args)
{
    const char* comma = strchr(names + 1, ',');
    cerr.write(names, comma - names) << " : " << arg1<<" | ";
    __f(comma+1, args...);
}
#else
#define debug(...)
#endif
//------------------------------------------------------------//
#define mod (int)(1e9 + 7)
#define N (int)1e5 + 5
#define M (int)1e6 + 5
#define OO 0x3f3f3f3f3f
//----------------------------------//
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;

//---------------------------------//
template<class T, class T2>
T _f_pow(T a, T2 b)
{
    T res = 1LL;
    //a%=mod;
    while (b > 0)
    {
        if (b & 1)
            res = (res*a);//res = (res * a)%mod;
        a = (a * a);
        //a%=mod;
        b >>= 1;
    }
    return (res);
}
template<class T>
T gcd(T a, T b)
{
    while(a && b)
        if(a > b)
            (a%=b);
        else(b%=a);

    return a + b;
}
template<class T>
T lcm(T a, T b)
{
    return (a * b) / gcd(a, b);
}

//int n, m, k;
//int ne, head[N], dist[N], nxt[M], to[M], cost[M], W[M];
//
//void init()
//{
//    memset(head, -1, n*sizeof(head[0]));
//    ne = 0;
//}
//
//void addEdge(int f, int t, int c, int w)
//{
//    to[ne] = t;
//    cost[ne] = c;
//    W[ne] = w;
//    nxt[ne] = head[f];
//    head[f] = ne++;
//}
//
//void addBiEdge(int a, int b, int c, int w)
//{
//    addEdge(a, b, c, w);
//    addEdge(b, a, c, w);
//}
void move1step(int& a, int& b, const int& q)
{
    int c = a - q*b;//truncating based remainder
    a = b;
    b = c;
}

int gcdI(int a, int b)
{
    while(b)    move1step(a, b, a/b);
    return a;
}

int eGCD(int r0, int r1, int& x0, int& y0)
{
    int x1 = y0 = 0, y1 = x0 = 1;
    while(r1)
    {
        int q = r0/r1;
        move1step(r0, r1, q);
        move1step(x0, x1, q);
        move1step(y0, y1, q);
    }
    return r0;
}

bool solveLDE(int a, int b, int c, int& x, int& y, int& g)
{
    g = eGCD(a, b, x, y);
    int m = c/g;
    x *= m;
    y *= m;
    return (c%g == 0);
}
ll sum (ll x)
{
    return x * (x + 1) / 2;
}
int n, k;
double a[3000], dp[3000][3000];
double solve(int i = 0, int h = 0)
{
    if(i == n)return h > (n/2);
    double& ret = dp[i][h];
    if(ret == ret)
        return ret;
    ret = a[i] * solve(i + 1, h + 1);
    ret += (1 - a[i]) * solve(i + 1, h);
    return ret;
}
int main()
{
    Ios;
    //inn;
    //outt;
    //auto tt = clock();
    cin >> n;
    lp(i, n)cin >> a[i];
    clr(dp, -1);
    cout << fixed << setprecision(9) <<solve() << endl;
    //cout << (double(clock() - tt)/CLOCKS_PER_SEC * 1.00) << endl;
    //system("sleep 50");
    return 0;
}


Measured memory_bytes: 70912