n = int(eval(input()))

probs = [float(c) for c in input().split()]



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

dp[0][0] = 1

for coin in range(1, n+1):

    for heads in range(n+1):

        dp[coin][heads] = dp[coin-1][heads] * (1 - probs[coin-1])

        if heads > 0:

            dp[coin][heads] += dp[coin-1][heads-1] * probs[coin-1]



ans = 0

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

    ans += dp[n][i]



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

probs = [float(c) for c in input().split()]



dp = [0] * (n+1)

dp[0] = 1

for coin in range(n):

    for heads in reversed(list(range(n+1))):

        dp[heads] = dp[heads] * (1 - probs[coin-1])

        if heads > 0:

            dp[heads] += dp[heads-1] * probs[coin-1]



ans = 0

for heads in range(n+1):

    tails = n - heads

    if heads > tails:

        ans += dp[heads]



print(ans)
n = int(eval(input()))
probs = [float(c) for c in input().split()]
dp = [[0] * (n + 1) for _ in range(n + 1)]
dp[0][0] = 1
for coin in range(1, n + 1):
    for heads in range(n + 1):
        dp[coin][heads] = dp[coin - 1][heads] * (1 - probs[coin - 1])
        if heads > 0:
            dp[coin][heads] += dp[coin - 1][heads - 1] * probs[coin - 1]
ans = 0
for i in range(n // 2 + 1, n + 1):
    ans += dp[n][i]
print(ans)

n = int(eval(input()))
probs = [float(c) for c in input().split()]
dp = [0] * (n + 1)
dp[0] = 1
for coin in range(n):
    for heads in reversed(list(range(n + 1))):
        dp[heads] = dp[heads] * (1 - probs[coin - 1])
        if heads > 0:
            dp[heads] += dp[heads - 1] * probs[coin - 1]
ans = 0
for heads in range(n + 1):
    tails = n - heads
    if heads > tails:
        ans += dp[heads]
print(ans)

-dp = [[0] * (n + 1) for _ in range(n + 1)] -dp[0][0] = 1 -for coin in range(1, n + 1): -    for heads in range(n + 1): -        dp[coin][heads] = dp[coin - 1][heads] * (1 - probs[coin - 1]) +dp = [0] * (n + 1) +dp[0] = 1 +for coin in range(n): +    for heads in reversed(list(range(n + 1))): +        dp[heads] = dp[heads] * (1 - probs[coin - 1]) -            dp[coin][heads] += dp[coin - 1][heads - 1] * probs[coin - 1] +            dp[heads] += dp[heads - 1] * probs[coin - 1] -for i in range(n // 2 + 1, n + 1): -    ans += dp[n][i] +for heads in range(n + 1): +    tails = n - heads +    if heads > tails: +        ans += dp[heads]