n = int(eval(input()))

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

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

dp[0][0] = 1

for i in range(n):

  for j in range(n+1):

    if j==0:

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

    else:

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

print((sum(dp[n][1+n//2:])))
import numpy as np



n = int(eval(input()))

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

dp = np.zeros((n+1, n+1))

dp[0, 0] = 1

for i in range(n):

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

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

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

import numpy as np

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

+import numpy as np + -dp = [[0] * (n + 1) for _ in range(n + 1)] -dp[0][0] = 1 +dp = np.zeros((n + 1, n + 1)) +dp[0, 0] = 1 -    for j in range(n + 1): -        if j == 0: -            dp[i + 1][j] = dp[i][j] * (1 - P[i]) -        else: -            dp[i + 1][j] = dp[i][j - 1] * P[i] + dp[i][j] * (1 - P[i]) -print((sum(dp[n][1 + n // 2 :]))) +    dp[i + 1, 0] = dp[i, 0] * (1 - P[i]) +    dp[i + 1, 1:] = dp[i, :-1] * P[i] + dp[i, 1:] * (1 - P[i]) +print((dp[n, 1 + n // 2 :].sum()))