/////////////////////////////////////////////////////////////////////////////////
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$'               `$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//  
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$'                   `$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
//$$$'`$$$$$$$$$$$$$'`$$$$$$!                       !$$$$$$'`$$$$$$$$$$$$$'`$$$//
//$$$$  $$$$$$$$$$$  $$$$$$$                         $$$$$$$  $$$$$$$$$$$  $$$$//
//$$$$. `$' \' \$`  $$$$$$$!       $$        $$      !$$$$$$$  '$/ `/ `$' .$$$$//
//$$$$$. !\  i  i .$$$$$$$$       $$$$      $$$$      $$$$$$$$. i  i  /! .$$$$$//
//$$$$$$   `--`--.$$$$$$$$$        $$        $$       $$$$$$$$$.--'--'   $$$$$$//
//$$$$$$L        `$$$$$^^$$                           $$^^$$$$$'        J$$$$$$//
//$$$$$$$.   .'   ""~   $$$    $.                 .$  $$$   ~""   `.   .$$$$$$$//
//$$$$$$$$.  ;      .e$$$$$!    $$.             .$$  !$$$$$e,      ;  .$$$$$$$$//
//$$$$$$$$$   `.$$$$$$$$$$$$     $$$.         .$$$   $$$$$$$$$$$$.'   $$$$$$$$$//
//$$$$$$$$    .$$$$$$$$$$$$$!     $$`$$$$$$$$'$$    !$$$$$$$$$$$$$.    $$$$$$$$//
//$$$$$$$     $$$$$$$$$$$$$$$$.    $    $$    $   .$$$$$$$$$$$$$$$$     $$$$$$$//
//                                 $    $$    $								   //
//                                 $.   $$   .$								   //
//                                `$        $'								   //
//                                 `$$$$$$$$'								   //
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////

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

// Type-Define 
typedef long long ll;
typedef std::vector<int> vi;
typedef std::vector<std::string> vs;
typedef std::vector<char> vc;
typedef std::vector< vector<int> > vii;
typedef std::pair<int, int> pii;

// Hash-Define
#define int long long
#define MOD 1000000007
#define debugStart cerr << "\n[DEBUG START]\n"
#define debugStop cerr << "\n[DEBUG STOP]\n"
#define KHATAM cout << std::endl;
#define set_zero(x) memset(x, 0, sizeof(x));
#define ForPrint(x) std::for_each( begin(x), end(x), []( auto const& el ){ std::cout << el << " ";  } )

//Functions 
template<typename T> auto gcd ( T a, T b ) -> int  { return (b==0)?a:gcd(b,a%b); }

const int inf = 1e9 + 5;

signed
main() {

    ios::sync_with_stdio(0);
    cin.tie(0);
    int T = 1; 
    //cin >> T;
    for ( int testcase = 1; testcase <= T; ++testcase ) {
        int N;
        std::cin >> N;
        double dp[N+1][N+1];
        double p[N];
        for ( int i = 0; i < N; ++i ) {
            std::cin >> p[i];
        }        
        for( int i = 0; i <= N; ++i ) for( int j = 0; j <= N; ++j ) {
            dp[i][j] = 0;
        }
        dp[0][0] = 1.0;
        for ( int i = 1; i <= N; ++i ) {
            for ( int j = 0; j <= i; ++j ) {
                if( j > 0 ) dp[i][j] += (dp[i-1][j-1] * p[i-1] );
                dp[i][j] += (dp[i-1][j] * (1-p[i-1]) ); 
            }
        }

        double answer = 0.0;
        for ( int i = N/2 + 1; i<= N; ++i  ) {
            answer += dp[N][i];
        }
        std::cout << std::setprecision(12) << answer ;
        KHATAM;
    }
    return 0;
}


Measured memory_bytes: 70656