N = int(eval(input()))

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

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

dp[1][1] = p[0]

dp[1][0] = 1 - p[0]

for i in range(1, N):

    dp[i+1][0] = dp[i][0] * (1 - p[i])



#i枚中j枚が表

for i in range(1, N):

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

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



ans = 0

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

    ans += dp[N][i]

print(ans)

n = int(eval(input()))

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



dp = [[0 for i in range(n+1)] for j 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])



ans = 0

for i in range(n+1):

    if i > n-i:

        ans += dp[n][i]



print(ans)

N = int(eval(input()))
p = list(map(float, input().split()))
dp = [[0 for i in range(N + 1)] for j in range(N + 1)]
dp[1][1] = p[0]
dp[1][0] = 1 - p[0]
for i in range(1, N):
    dp[i + 1][0] = dp[i][0] * (1 - p[i])
# i枚中j枚が表
for i in range(1, N):
    for j in range(1, N + 1):
        dp[i + 1][j] = dp[i][j] * (1 - p[i]) + dp[i][j - 1] * p[i]
ans = 0
for i in range(N // 2 + 1, N + 1):
    ans += dp[N][i]
print(ans)

n = int(eval(input()))
p = list(map(float, input().split()))
dp = [[0 for i in range(n + 1)] for j 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])
ans = 0
for i in range(n + 1):
    if i > n - i:
        ans += dp[n][i]
print(ans)

-N = int(eval(input())) +n = int(eval(input())) -dp = [[0 for i in range(N + 1)] for j in range(N + 1)] -dp[1][1] = p[0] -dp[1][0] = 1 - p[0] -for i in range(1, N): -    dp[i + 1][0] = dp[i][0] * (1 - p[i]) -# i枚中j枚が表 -for i in range(1, N): -    for j in range(1, N + 1): -        dp[i + 1][j] = dp[i][j] * (1 - p[i]) + dp[i][j - 1] * p[i] +dp = [[0 for i in range(n + 1)] for j 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]) -for i in range(N // 2 + 1, N + 1): -    ans += dp[N][i] +for i in range(n + 1): +    if i > n - i: +        ans += dp[n][i]