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

const int mxN=3e3;
int n;
long double p[mxN], dp[mxN+1][mxN+1], ans;

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);

	cin >> n;
	for(int i=0; i<n; ++i)
		cin >> p[i];
	dp[0][0]=1;
	for(int i=0; i<n; ++i)
		for(int j=0; j<=i; ++j) {
			dp[i+1][j+1]+=dp[i][j]*p[i];
			dp[i+1][j]+=dp[i][j]*(1-p[i]);
		}
	for(int j=(n+1)/2; j<=n; ++j)
		ans+=dp[n][j];
	cout << fixed << setprecision(16) << ans;
}