N = int(eval(input()))

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



dp = [[0 for j in range(N+1)] for i in range(N)]#i+1枚目までのコインを投げたときにj枚表が出る確率



dp[0][0] = 1-P[0]

dp[0][1] = P[0]

for i in range(1,N):

    dp[i][0] = dp[i-1][0]*(1-P[i])



for i in range(1,N):

    for j in range(1,N+1):

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



ans = 0

for j in range(-(-N//2),N+1):

    ans += dp[N-1][j]

    

print(ans)
N = int(eval(input()))

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



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

dp[0] = 1



for i in range(N):

    p = P[i]

    for j in range(N)[::-1]:

        dp[j + 1] += dp[j] * p

        dp[j] *= 1 - p



print((sum(dp[N // 2 + 1:])))
N = int(eval(input()))
P = list(map(float, input().split()))
dp = [[0 for j in range(N + 1)] for i in range(N)]  # i+1枚目までのコインを投げたときにj枚表が出る確率
dp[0][0] = 1 - P[0]
dp[0][1] = P[0]
for i in range(1, N):
    dp[i][0] = dp[i - 1][0] * (1 - P[i])
for i in range(1, N):
    for j in range(1, N + 1):
        dp[i][j] = dp[i - 1][j - 1] * P[i] + dp[i - 1][j] * (1 - P[i])
ans = 0
for j in range(-(-N // 2), N + 1):
    ans += dp[N - 1][j]
print(ans)

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

-dp = [[0 for j in range(N + 1)] for i in range(N)]  # i+1枚目までのコインを投げたときにj枚表が出る確率 -dp[0][0] = 1 - P[0] -dp[0][1] = P[0] -for i in range(1, N): -    dp[i][0] = dp[i - 1][0] * (1 - P[i]) -for i in range(1, N): -    for j in range(1, N + 1): -        dp[i][j] = dp[i - 1][j - 1] * P[i] + dp[i - 1][j] * (1 - P[i]) -ans = 0 -for j in range(-(-N // 2), N + 1): -    ans += dp[N - 1][j] -print(ans) +dp = [0 for _ in range(N + 1)] +dp[0] = 1 +for i in range(N): +    p = P[i] +    for j in range(N)[::-1]: +        dp[j + 1] += dp[j] * p +        dp[j] *= 1 - p +print((sum(dp[N // 2 + 1 :])))