import numpy as np

n= int(eval(input()))

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

dp = [0]*(n+1)

dp[0]=1

for p in ppp:

  ndp = [item*(1-p) for item in dp]

  ndp = [ndp[i] if i == 0 else ndp[i]+dp[i-1]*p for i in range(n+1)]

  dp = ndp

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

n= int(eval(input()))

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

dp = np.array([0.0]*(n+1),dtype=np.float64)

dp[0]=1

for p in ppp:

  ndp = dp*(1-p)

  ndp[1:] += dp[:-1]*p

  dp = ndp

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

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

import numpy as np

n = int(eval(input()))
ppp = list(map(float, input().split()))
dp = np.array([0.0] * (n + 1), dtype=np.float64)
dp[0] = 1
for p in ppp:
    ndp = dp * (1 - p)
    ndp[1:] += dp[:-1] * p
    dp = ndp
print((sum(dp[n // 2 + 1 :])))

-dp = [0] * (n + 1) +dp = np.array([0.0] * (n + 1), dtype=np.float64) -    ndp = [item * (1 - p) for item in dp] -    ndp = [ndp[i] if i == 0 else ndp[i] + dp[i - 1] * p for i in range(n + 1)] +    ndp = dp * (1 - p) +    ndp[1:] += dp[:-1] * p