import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, std.bitmanip;

immutable long MOD = 10^^9 + 7;

void main() {
    auto N = readln.chomp.to!int;
    auto P = readln.split.map!(to!real).array;

    auto dp = new real[][](N+1, N+1);
    foreach (i; 0..N+1) fill(dp[i], 0);
    dp[0][0] = 1;

    foreach (i; 0..N) {
        foreach (j; 0..N) {
            dp[i+1][j+1] += dp[i][j] * P[i];
            dp[i+1][j] += dp[i][j] * (1 - P[i]);
        }
    }

    real ans = 0;

    foreach (j; 0..N+1) {
        int k = N - j;
        if (j > k) {
            ans += dp[N][j];
        }
    }

    writefln("%.15f", ans);
}
