/*#include <bits/stdc++.h>
#define cross(a,b) (conj(a)*(b)).imag()
#define dot(a,b) (conj(a)*(b)).real()
#define ld long double
#define ll long long
#define vec(a,b) (b-a)
#define pi acos(-1)
//#define x real()
//#define y imag()


using namespace std;
typedef complex <ld> point;
typedef vector<point> polygon;
typedef tuple<int,int,int> line; // represents a b c of line

vector <ll> v;
//vector <ll> vc;

//ll mod = 1e9 +7;
//ll fact[1000005], inv[1000005];
//int p;


bool prime(ll n)
{
   if(n==1)
    return false;
   for(int i=2; i<=sqrt(n); ++i)
   {
       if(n%i==0)
       {
           return false;
       }
   }
   return true;
}

/*unsigned long long fp(ll x, ll y)
{
    if(y==0)
    {
        return 1;
    }
    ll z = fp(x,(y/2));

    if(y%2==0)
    {
        return (z*z)%p;
    }
    else
        return (((z*z)%p)*(x%p))%p;
}*/
/*unsigned long long fp(ll x, ll y)
{
    if(y==0)
    {
        return 1;
    }
    ll z = fp(x,(y/2));

    if(y%2==0)
    {
        return (z*z)%mod;
    }
    else
        return (((z*z)%mod)*(x%mod))%mod;
}
void pre()
{
  fact[0]=inv[0]=1;
  for(int i=1; i<=1000005; ++i)
  {
      fact[i]=(fact[i-1]*i)%mod;
      inv[i]=fp(fact[i], mod-2);
  }
}
unsigned ll ncr(int n, int r)
{
    return (((fact[n]*inv[n-r])%mod) * inv[r])%mod;
}*/

/*int main()
{
    //pre();
    int n, ans=0;
    ll c;
    cin >> n;
    for(int k=1; k<=n; ++k)
    {
        c=0;
        bool arr[30005]={false};
        if(prime(k))
            continue;
        for(ll i=1; i*i<=k; ++i)
        {
            if(k%i==0 && prime(i) && arr[i]==false)
            {
                c++;
                arr[i]=true;
            }
            if(k%i==0 && prime(k/i) && arr[k/i]==false)
            {
                    c++;
                    arr[k/i]=true;
            }
        }
        if(c==2)
            ans++;
    }
    cout << ans << endl;*/
/*cin >>p;
int cnt=0;
bool ch=1;
for(int i=1; i<p; ++i)
{
    ch=1;
    for(int j=1; j<=p-2; ++j)
    {
            if(((fp(i,j)-1)+p)%p==0)
            {
                ch=0;
            }
            if( ((fp(i,p-1)-1)+p)%p!=0)
            {
                ch=0;
            }
            if(!ch)
            {
                break;
            }
    }
    if(ch)
        cnt++;
}
cout << cnt << endl;*/
//return 0;
//}

#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define mod 1000000007
using namespace std;

const int N=3005;
ld ans[N][N];
ld arr[N];
vector< vector<ll> > v(N);
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int n;
    cin >> n;
    for(int i=1; i<=n; ++i)
    {
        cin >> arr[i];
    }
    ans[1][0]=(1-arr[1]);
    ans[1][1]= arr[1];
    for(int i=2; i<=n; ++i)
    {
        for(int j=0; j<=n; ++j)
        {
            if(j<=i)
            {
                if(j)
                {
                ans[i][j]=ans[i-1][j] * (1-arr[i])
                + ans[i-1][j-1] * arr[i];
                }
                else
                    ans[i][j]=ans[i-1][j] * (1-arr[i]);
            }
            else
                ans[i][j] = 0;
        }
    }
    ld res=0;
    for(int i=(n+1)/2 /*or i=ceil((ld)n/2)*/; i<=n; ++i)
    {
        res+=ans[n][i];
    }
    cout << fixed << setprecision(12) << res << endl;
    return 0;
}





Measured memory_bytes: 141184