n=int(eval(input()))

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

lim=(n+1)//2

dp=[0]*(lim+1)

dp[0]=1

for pi,p in enumerate(ps):

    if pi+1>=lim:

        st=lim-1

        dp[lim]=dp[lim]+dp[lim-1]*p

    else:

        st=pi+1

    for i in range(st,0,-1):

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

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

print((dp[-1]))
import numpy as np



n=int(eval(input()))

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

lim=(n+1)//2

dp=np.zeros(lim+1,dtype=np.float64)

dp[0]=1

for p in ps:

    dp[lim]=dp[lim]+dp[lim-1]*p

    dp[1:lim]=dp[:lim-1]*p+dp[1:lim]*(1-p)

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

print((dp[-1]))
n = int(eval(input()))
ps = list(map(float, input().split()))
lim = (n + 1) // 2
dp = [0] * (lim + 1)
dp[0] = 1
for pi, p in enumerate(ps):
    if pi + 1 >= lim:
        st = lim - 1
        dp[lim] = dp[lim] + dp[lim - 1] * p
    else:
        st = pi + 1
    for i in range(st, 0, -1):
        dp[i] = dp[i - 1] * p + dp[i] * (1 - p)
    dp[0] = dp[0] * (1 - p)
print((dp[-1]))

import numpy as np

n = int(eval(input()))
ps = list(map(float, input().split()))
lim = (n + 1) // 2
dp = np.zeros(lim + 1, dtype=np.float64)
dp[0] = 1
for p in ps:
    dp[lim] = dp[lim] + dp[lim - 1] * p
    dp[1:lim] = dp[: lim - 1] * p + dp[1:lim] * (1 - p)
    dp[0] = dp[0] * (1 - p)
print((dp[-1]))

+import numpy as np + -dp = [0] * (lim + 1) +dp = np.zeros(lim + 1, dtype=np.float64) -for pi, p in enumerate(ps): -    if pi + 1 >= lim: -        st = lim - 1 -        dp[lim] = dp[lim] + dp[lim - 1] * p -    else: -        st = pi + 1 -    for i in range(st, 0, -1): -        dp[i] = dp[i - 1] * p + dp[i] * (1 - p) +for p in ps: +    dp[lim] = dp[lim] + dp[lim - 1] * p +    dp[1:lim] = dp[: lim - 1] * p + dp[1:lim] * (1 - p)