n = int(eval(input()))

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

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

dp[0][0]=1

for i in range(n):

    for j in range(n):

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

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

print((sum(dp[n][n//2+1:])))
n = int(eval(input()))

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

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

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

    l,j=1,i

    while j<n:

        if i==0:

            l=l*a[j]

            dp[i][j]=l

            j=j+1

        else:

            for k in range(i):

                l=l*(1-a[k])

                dp[i][k]=l

            while j<n:

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

                j=j+1

l=0

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

    l+=dp[i][n-1]

print(l)

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

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

-dp = [[0 for _ in range(n + 1)] for _ in range(n + 1)] -dp[0][0] = 1 -for i in range(n): -    for j in range(n): -        dp[i + 1][j + 1] += dp[i][j] * a[i] -        dp[i + 1][j] += dp[i][j] * (1 - a[i]) -print((sum(dp[n][n // 2 + 1 :]))) +dp = [[0 for i in range(n)] for i in range(n // 2 + 1)] +for i in range((n // 2) + 1): +    l, j = 1, i +    while j < n: +        if i == 0: +            l = l * a[j] +            dp[i][j] = l +            j = j + 1 +        else: +            for k in range(i): +                l = l * (1 - a[k]) +                dp[i][k] = l +            while j < n: +                dp[i][j] = (dp[i - 1][j - 1] * (1 - a[j])) + (dp[i][j - 1] * a[j]) +                j = j + 1 +l = 0 +for i in range(n // 2 + 1): +    l += dp[i][n - 1] +print(l)