n=int(eval(input()))

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



mid=(n+2)//2

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

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

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



for i in range(n-1):

    for j in range(n+1):

        if dp[i][j]!=0:

            #表が出るとき

            dp[i+1][j+1]+=dp[i][j]*p[i+1]

            #裏

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

print((sum(dp[-1][mid:])))
n=int(eval(input()))

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



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



for i in range(n):

    for j in range(n+1):



        if i==0:

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

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

        else:

            #表が出る

            if dp[i-1][j-1]!=0:

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

            #裏

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



print((sum(dp[-1][int(n/2)+1:])))

#print(dp)

n = int(eval(input()))
p = list(map(float, input().split()))
mid = (n + 2) // 2
dp = [[0] * (n + 1) for i in range(n)]
dp[0][0] = 1 - p[0]
dp[0][1] = p[0]
for i in range(n - 1):
    for j in range(n + 1):
        if dp[i][j] != 0:
            # 表が出るとき
            dp[i + 1][j + 1] += dp[i][j] * p[i + 1]
            # 裏
            dp[i + 1][j] += dp[i][j] * (1 - p[i + 1])
print((sum(dp[-1][mid:])))

n = int(eval(input()))
p = list(map(float, input().split()))
dp = [[0] * (n + 1) for i in range(n)]
for i in range(n):
    for j in range(n + 1):
        if i == 0:
            dp[0][0] = 1 - p[i]
            dp[0][1] = p[i]
        else:
            # 表が出る
            if dp[i - 1][j - 1] != 0:
                dp[i][j] += dp[i - 1][j - 1] * p[i]
                # 裏
                dp[i][j - 1] += dp[i - 1][j - 1] * (1 - p[i])
print((sum(dp[-1][int(n / 2) + 1 :])))
# print(dp)

-mid = (n + 2) // 2 -dp[0][0] = 1 - p[0] -dp[0][1] = p[0] -for i in range(n - 1): +for i in range(n): -        if dp[i][j] != 0: -            # 表が出るとき -            dp[i + 1][j + 1] += dp[i][j] * p[i + 1] -            # 裏 -            dp[i + 1][j] += dp[i][j] * (1 - p[i + 1]) -print((sum(dp[-1][mid:]))) +        if i == 0: +            dp[0][0] = 1 - p[i] +            dp[0][1] = p[i] +        else: +            # 表が出る +            if dp[i - 1][j - 1] != 0: +                dp[i][j] += dp[i - 1][j - 1] * p[i] +                # 裏 +                dp[i][j - 1] += dp[i - 1][j - 1] * (1 - p[i]) +print((sum(dp[-1][int(n / 2) + 1 :]))) +# print(dp)