import std.stdio;
import std.algorithm;
import std.array;
import std.conv;
import std.datetime;
import std.numeric;
import std.math;
import std.string;

string my_readln() { return chomp(readln()); }

void main()
{
	auto tokens = my_readln().split();
	auto N = tokens[0].to!ulong;
	double[] p;
	foreach (token; my_readln.split)
	{
		p ~= token.to!double;
	}

	double[][] dp;
	dp.length = N + 10;
	foreach (ref e; dp) e.length = N + 10;
	dp[0][0] = 1.0 - p[0];
	dp[0][1] = p[0];
	foreach (i; 1..N)
	{
		auto q     = 1.0 - p[i];
		dp[i][0]   = dp[i-1][0] * q;
		dp[i][i+1] = dp[i-1][i] * p[i];
		foreach (j; 1..i+1)
		{
			dp[i][j] = dp[i-1][j] * q + dp[i-1][j-1] * p[i];
		}
	}

	double ans = 0.0;
	foreach (i; (N+1)/2..N+1)
	{
		ans += dp[N-1][i];
	}

	writeln(ans);
	stdout.flush();
}