#include<bits/stdc++.h>
using namespace std;
const int N = 3e3+3;
double dp[N][N], p[N];
int main() {
	int n;
	cin >> n;
	for(int i = 0; i < n; ++i){
		dp[i][0] = 1;
		cin >> p[i];
	}
	dp[n][0] = dp[n+1][0] = 1;
	for(int i = n; i > 0; --i)
		for(int heds = 1; heds <= n; ++heds){
			dp[i][heds] = p[i-1] * dp[i+1][heds-1];
			dp[i][heds] += (1 - p[i-1]) * dp[i+1][heds];
		}
	cout << setprecision(11) << dp[1][(n+2)/2];
	return 0;
}
