#include "bits/stdc++.h"
using namespace std;
using ll = long long;
using vll = std::vector<ll>;
using vvll = std::vector<vll>;

constexpr ll INF = 1LL << 60;
constexpr ll MOD = 1e9L + 7L;// 998244353L;

struct Fast{Fast(){cin.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(10);}}fast;//cin高速化のおまじない

#define REPS(i, S, E) for (ll i = (S); i <= (E); i++)
#define REP(i, N) REPS(i, 0, N-1)
#define DEPS(i, E, S) for (ll i = (E); i >= (S); i--)
#define DEP(i, N) DEPS(i, N-1, 0)
#define EACH(e, v) for (auto&& e : v)

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; }return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; }return false; }
//template<class T> inline T MaxE(vector<T>&v,ll S,ll E){T m=v[S];for(ll i=S;i<=E;i++)chmax(m,v[i]);return m;}//v[S]～v[E]の最大値
//template<class T> inline T MinE(vector<T>&v,ll S,ll E){T m=v[S];for(ll i=S;i<=E;i++)chmin(m,v[i]);return m;}
template<class T> inline T MaxE(vector<T>&v,ll S,ll E){T m=v[S];REPS(i,S,E)chmax(m,v[i]);return m;}//v[S]～v[E]の最大値
template<class T> inline T MinE(vector<T>&v,ll S,ll E){T m=v[S];REPS(i,S,E)chmin(m,v[i]);return m;}//v[S]～v[E]の最小値
template<class T> inline T MaxE(vector<T>&v,ll N) { return MaxE(v, 0, N - 1); } //先頭N個中の最大値
template<class T> inline T MinE(vector<T>&v,ll N) { return MinE(v, 0, N - 1); }
//template<class T> inline T MaxE(vector<T>&v) { T m = v[0]; for (T e : v)chmax(m, e); return m; }
//template<class T> inline T MinE(vector<T>&v) { T m = v[0]; for (T e : v)chmin(m, e); return m; }
template<class T> inline T MaxE(vector<T>&v) { return MaxE(v, (ll)v.size() ); }
template<class T> inline T MinE(vector<T>&v) { return MinE(v, (ll)v.size() ); }
//template<class T> inline ll MaxI(vector<T>&v,ll S,ll E){ll m=S;for(ll i=S;i<=E;i++){if(v[i]>v[m])m=i;}return m;}
//template<class T> inline ll MinI(vector<T>&v,ll S,ll E){ll m=S;for(ll i=S;i<=E;i++){if(v[i]<v[m])m=i;}return m;}
template<class T> inline ll MaxI(vector<T>&v,ll S,ll E){ll m=S;REPS(i,S,E){if(v[i]>v[m])m=i;}return m;}
template<class T> inline ll MinI(vector<T>&v,ll S,ll E){ll m=S;REPS(i,S,E){if(v[i]<v[m])m=i;}return m;}
template<class T> inline ll MaxI(vector<T>&v,ll N) { return MaxI(v, 0, N - 1); }
template<class T> inline ll MinI(vector<T>&v,ll N) { return MinI(v, 0, N - 1); }
template<class T> inline ll MaxI(vector<T>& v) { return MaxI(v, (ll)v.size() ); }
template<class T> inline ll MinI(vector<T>& v) { return MinI(v, (ll)v.size() ); }

template<class T> inline T Sum(vector<T>&v,ll S,ll E){T s=v[S];REPS(i,S+1,E)s+=v[i];return s;}
template<class T> inline T SumMOD(vector<T>&v,ll S,ll E){T s=v[S];REPS(i,S+1,E)s=(s+v[i])%MOD;return s;}

inline ll AddMOD(ll a, ll b) { return (a + b) % MOD; }
inline ll SubMOD(ll a, ll b) { return (a - b + MOD) % MOD; }
inline ll MulMOD(ll a, ll b) { return (a * b) % MOD; }


template <typename T> inline void print(T &x) {
	cout << x << '\n';
}


inline ll in() { ll x; cin >> x; return x; }
template<class T> inline T in_() { T x; cin >> x; return x; }
template<class T> std::vector<T> in_v(ll num, bool to_0_origin = false) {
	std::vector<T> v(num);
	REP(i, num) {
		cin >> v[i];
		if (to_0_origin) v[i]--;
	}
	return std::move(v);
}


int main()
{
	ll N = in();
	std::vector<double> p = in_v<double>(N);

	ll i_ = 1;//offset
	std::vector<std::vector<double>> tbl(N+i_, std::vector<double>(N+1, 0.0));

	tbl[-1+i_][0] = 1.0;

	//配るDP
	REPS(i, -1, N-2){
		REPS(j, 0, i+1){
			tbl[i + 1 + i_][j]   += (1 - p[i + 1]) * tbl[i + i_][j];
			tbl[i + 1 + i_][j+1] += p[i + 1]       * tbl[i + i_][j];
		}
	}

	//結果取り出し
	cout << Sum(tbl[N - 1 + i_], N / 2 + 1, N) << '\n';
//	cout << fixed << setprecision(10) << Sum(tbl[N - 1 + i_], N / 2 + 1, N) << '\n';

	return 0;
}


Measured memory_bytes: 70784