import sys

input=sys.stdin.readline

n=int(eval(input()))

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

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

DP[0][0]=1

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

    for j in range(i+1):

        DP[i][j]=DP[i-1][j]*(1-P[i-1])

        if j:

            DP[i][j]+=DP[i-1][j-1]*P[i-1]

ans=0

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

    ans+=DP[-1][i]

print(ans)
import sys

input=sys.stdin.readline

n=int(eval(input()))

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

DP=[[0.0]*(n+1) for _ in range(n+1)]

DP[0][0]=1.0

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

    for j in range(i+1):

        DP[i][j]=DP[i-1][j]*(1-P[i-1])

        if j:

            DP[i][j]+=DP[i-1][j-1]*P[i-1]

ans=0.0

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

    ans+=DP[-1][i]

print(ans)
import sys

input = sys.stdin.readline
n = int(eval(input()))
P = tuple(map(float, input().split()))
DP = [[0] * (n + 1) for _ in range(n + 1)]
DP[0][0] = 1
for i in range(1, n + 1):
    for j in range(i + 1):
        DP[i][j] = DP[i - 1][j] * (1 - P[i - 1])
        if j:
            DP[i][j] += DP[i - 1][j - 1] * P[i - 1]
ans = 0
for i in range(n // 2 + 1, n + 1):
    ans += DP[-1][i]
print(ans)

import sys

input = sys.stdin.readline
n = int(eval(input()))
P = tuple(map(float, input().split()))
DP = [[0.0] * (n + 1) for _ in range(n + 1)]
DP[0][0] = 1.0
for i in range(1, n + 1):
    for j in range(i + 1):
        DP[i][j] = DP[i - 1][j] * (1 - P[i - 1])
        if j:
            DP[i][j] += DP[i - 1][j - 1] * P[i - 1]
ans = 0.0
for i in range(n // 2 + 1, n + 1):
    ans += DP[-1][i]
print(ans)

-DP = [[0] * (n + 1) for _ in range(n + 1)] -DP[0][0] = 1 +DP = [[0.0] * (n + 1) for _ in range(n + 1)] +DP[0][0] = 1.0 -ans = 0 +ans = 0.0