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(1,N+1):

  for j in range(i+1):

    if j == 0:

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

    else:

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



sum_ = 0

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

  sum_ += dp[i][-1]



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

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



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



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

  if i == 1:

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

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

    continue

  for j in range(i+1):

    if j == 0:

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

      continue

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

    

ans=0

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

  ans += dp[-1][j]

  

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(1, N + 1):
    for j in range(i + 1):
        if j == 0:
            dp[j][i] = (1 - p[i - 1]) * dp[j][i - 1]
        else:
            dp[j][i] = (1 - p[i - 1]) * dp[j][i - 1] + p[i - 1] * dp[j - 1][i - 1]
sum_ = 0
for i in range(N // 2 + 1, N + 1):
    sum_ += dp[i][-1]
print(sum_)

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

-p = list(map(float, input().split())) -dp = [[0 for i in range(N + 1)] for j in range(N + 1)] -dp[0][0] = 1 +(*p,) = list(map(float, input().split())) +dp = [[0] * (N + 1) for _ in range(N + 1)] +    if i == 1: +        dp[i][0] = 1 - p[0] +        dp[i][1] = p[0] +        continue -            dp[j][i] = (1 - p[i - 1]) * dp[j][i - 1] -        else: -            dp[j][i] = (1 - p[i - 1]) * dp[j][i - 1] + p[i - 1] * dp[j - 1][i - 1] -sum_ = 0 -for i in range(N // 2 + 1, N + 1): -    sum_ += dp[i][-1] -print(sum_) +            dp[i][j] = dp[i - 1][j] * (1 - p[i - 1]) +            continue +        dp[i][j] = dp[i - 1][j] * (1 - p[i - 1]) + dp[i - 1][j - 1] * p[i - 1] +ans = 0 +for j in range(N // 2 + 1, N + 1): +    ans += dp[-1][j] +print(ans)