/**
    ▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
        Make it happen now, not tomorrow.
        Tomorrow is a  loser's excuse.
    ▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
**/
#ifndef _GLIbCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#if __cplu >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#include <cstring>
#endif

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include<random>
#include <chrono>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplu >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <time.h>
#endif
#define __ ios_base::sync_with_stdio(false);cin.tie(NULL);
using namespace std;
// #define INF 0x7f7f7f7f
#define ull unsigned long long int
#define pii pair<int,int>
#define ll long long int
#define ld long double
#define MSET(x,y) memset(x,y,sizeof(x))
// #define l long
#define se second
#define fi first
#define NIL 0
#define UNVISITED -1
#define EXPOLORED 0
#define mk make_pair
#define pb push_back
#define sc(n) scanf("%d",&n)
#define NIL 0
#define pii pair<int,int>
#define eps 1e-9
#define all(x) x.begin(),x.end()
#define me(u,v,w) make_pair(w,make_pair(u,v))
#define sqr(x) x*x
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define inrange(x,y,row,col) (x>=0 && y>=0 && x<row && y<col)
#define foreach(e, x) for(__typeof(x.begin()) e = x.begin(); e != x.end(); ++ e)
// #define add(a,b) (a + b >= MOD ? a+b-MOD:a+b)
#define hs(c1,c2) (256*min(c1,c2) + max(c1,c2))
typedef struct{ int sum,suf,pre,max;} Node;
int toint(const string &s) { stringstream ss; ss << s; int x; ss >> x; return x; }
// const int MAXN = 3010;
const int N = 1e6+10;
const int UP = 31;
const int lim = 1e18+1;
const ll mod = 1e9+7;
const ll inf = 3e18*1LL;
// const int inf = 1e9+10;
// const double pi = 3.141592653589793238462643383;
const double pi = acos(-1);
const int INF = 1e9;
const double Phi =  1.618033988749894;
const int logn = 20;
const double phi = 0.618033988749894;
const double root5 = 2.236067977;
/**
    ▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
        Make it happen now, not tomorrow.
        Tomorrow is a loser's excuse.
    ▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
There is nothin in a catterpillar that tells you its going to be a butterfly ---------!
//--- Matrix Expo//

//-- Matix Expo//
**/
//Trie
struct node
{
    node *child[2];
    node(){
        child[0] = child[1] = NULL;
    }
};
node *root;
ll all[N];
//Trie
deque<short> binary(ll x){
    deque<short>  ans;
    while(x){
        ans.push_front(x%2);
        x /= 2;
    }
    while(ans.size()<50){
        ans.push_front(0);
    }
    return ans;
}
void add(ll x){
    deque<short> a = binary(x);
    node *c = root;
    while(a.size()){
        if(c->child[a[0]]==NULL)
        c->child[a[0]] = new node;
        c = c->child[a[0]];
        a.pop_front();
    }
}
long long query(long long x)
{
  deque<short> a=binary(x);
  ll ans = 0;
  node *c = root;
  while (a.size())
  {
      if(c->child[1-a[0]] != NULL){
          c = c->child[1-a[0]];
          ans *= 2;
          ans += 1;
      }else{
          c = c->child[a[0]];
          ans *= 2;
      }
      a.pop_front();
  }
  return ans;
  // long long ans=0;
  // node *C=root;
  // while(a.size())
  //   {
  //     if(C->child[1-a[0]]!=NULL)
  //     {
  //         C=C->child[1-a[0]];
  //         ans*=2;
  //         ans+=1;
  //     }
  //     else
  //     {
  //         C=C->child[a[0]];
  //         ans*=2;
  //     }
  //     a.pop_front();
  //   }
  // return ans;
}
double dp[3010][3010];
double head[3010];
int n;
int main(){
    scanf("%d",&n);
    double ans = 0;
    for(int i=1;i<=n;++i){
        cin>>head[i];
    }
    for(int i=0;i<=n;++i){
        for(int j=0;j<=n;++j){
            dp[i][j] = 0;
        }
    }
    dp[0][0] = 1;
    for(int i=1;i<=n;++i){
        for(int j=0;j<=i;++j){
            dp[i][j] = (dp[i-1][j-1]*head[i] + dp[i-1][j]*(1.-head[i]));
        }
    }
    // for(int i=0;i<=n;++i){
    //     for(int j=0;j<=n;++j)
    //     {
    //         cout<<dp[i][j]<<" ";
    //     }
    //     cout<<endl;
    // }
    int thres = (n+1)/2;
    for(int j =0;j<=n;++j){
        if(j>=thres){
            ans += dp[n][j];
        }
    }
    printf("%.10lf",ans);
    return 0;
}


Measured memory_bytes: 72064