N = int(eval(input()))

P = list(map(float, input().split()))



dp = [1] + [0] * N

for p in P:

    dp = [p * a + (1 - p) * b for a, b in zip([0] + dp, dp)]



print((sum(dp[-(-N // 2):])))
from numpy import zeros



N = int(eval(input()))

P = list(map(float, input().split()))



dp = zeros(N + 1)

dp[0] = 1.0



for p in P:

    T = dp

    dp = T * (1 - p)

    dp[1:] += T[:-1] * p



print((dp[-(-N // 2):].sum()))
N = int(eval(input()))
P = list(map(float, input().split()))
dp = [1] + [0] * N
for p in P:
    dp = [p * a + (1 - p) * b for a, b in zip([0] + dp, dp)]
print((sum(dp[-(-N // 2) :])))

from numpy import zeros

N = int(eval(input()))
P = list(map(float, input().split()))
dp = zeros(N + 1)
dp[0] = 1.0
for p in P:
    T = dp
    dp = T * (1 - p)
    dp[1:] += T[:-1] * p
print((dp[-(-N // 2) :].sum()))

+from numpy import zeros + -dp = [1] + [0] * N +dp = zeros(N + 1) +dp[0] = 1.0 -    dp = [p * a + (1 - p) * b for a, b in zip([0] + dp, dp)] -print((sum(dp[-(-N // 2) :]))) +    T = dp +    dp = T * (1 - p) +    dp[1:] += T[:-1] * p +print((dp[-(-N // 2) :].sum()))