N = int(eval(input()))

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



dp = [[0 for _ in range(N + 1)] for __ in range(N + 1)]

dp[0][0] = 1

for i in range(N):

    for j in range(N):

        dp[i + 1][j + 1] += dp[i][j] * P[i]

        dp[i + 1][j] += dp[i][j] * (1 - P[i])

print((sum(dp[N][(N + 1) // 2:])))

import numpy as np



N = int(eval(input()))

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



dp = np.zeros((N + 1, N + 1), dtype=float)

dp[0][0] = 1

for i in range(N):

    dp[i + 1][1:] += dp[i][:-1] * P[i]

    dp[i + 1][:-1] += dp[i][:-1] * (1 - P[i])

print((sum(dp[N][(N + 1) // 2:])))

N = int(eval(input()))
P = tuple(map(float, input().split()))
dp = [[0 for _ in range(N + 1)] for __ in range(N + 1)]
dp[0][0] = 1
for i in range(N):
    for j in range(N):
        dp[i + 1][j + 1] += dp[i][j] * P[i]
        dp[i + 1][j] += dp[i][j] * (1 - P[i])
print((sum(dp[N][(N + 1) // 2 :])))

import numpy as np

N = int(eval(input()))
P = tuple(map(float, input().split()))
dp = np.zeros((N + 1, N + 1), dtype=float)
dp[0][0] = 1
for i in range(N):
    dp[i + 1][1:] += dp[i][:-1] * P[i]
    dp[i + 1][:-1] += dp[i][:-1] * (1 - P[i])
print((sum(dp[N][(N + 1) // 2 :])))

+import numpy as np + -dp = [[0 for _ in range(N + 1)] for __ in range(N + 1)] +dp = np.zeros((N + 1, N + 1), dtype=float) -    for j in range(N): -        dp[i + 1][j + 1] += dp[i][j] * P[i] -        dp[i + 1][j] += dp[i][j] * (1 - P[i]) +    dp[i + 1][1:] += dp[i][:-1] * P[i] +    dp[i + 1][:-1] += dp[i][:-1] * (1 - P[i])