import sys



sys.setrecursionlimit(10 ** 9)





# map(int, sys.stdin.read().split())





def input():

    return sys.stdin.readline().rstrip()





def main():

    N = int(eval(input()))

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



    dp = [[0 for _ in range(N+1)] for i in range(N+1)]   #i枚投げたときの　j表が出た枚　のdpが確立

    dp[0][0] =1

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

        for j in range(0,i+1):

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



    n = (N+1)//2



    print((sum(dp[N][n:])))

    pass



if __name__ == "__main__":

    main()

import sys

import math





# \n

def input():

    return sys.stdin.readline().rstrip()





def main():

    N=int(eval(input()))

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



    dp=[0]*(N+1)

    dp[0]=1

    for j in range(N):

        p =P[j]

        for i in range(N, -1, -1):



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

            if i ==0:

                continue

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



    print((sum(dp[N//2+1:])))













if __name__ == "__main__":

    main()

import sys

sys.setrecursionlimit(10**9)
# map(int, sys.stdin.read().split())
def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(eval(input()))
    P = list(map(float, input().split()))
    dp = [[0 for _ in range(N + 1)] for i in range(N + 1)]  # i枚投げたときの　j表が出た枚　のdpが確立
    dp[0][0] = 1
    for i in range(1, N + 1):
        for j in range(0, i + 1):
            dp[i][j] = dp[i - 1][j] * (1 - P[i - 1]) + dp[i - 1][j - 1] * P[i - 1]
    n = (N + 1) // 2
    print((sum(dp[N][n:])))
    pass


if __name__ == "__main__":
    main()

import sys
import math

# \n
def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(eval(input()))
    P = list(map(float, input().split()))
    dp = [0] * (N + 1)
    dp[0] = 1
    for j in range(N):
        p = P[j]
        for i in range(N, -1, -1):
            dp[i] = dp[i] * (1 - p)
            if i == 0:
                continue
            dp[i] += dp[i - 1] * p
    print((sum(dp[N // 2 + 1 :])))


if __name__ == "__main__":
    main()

+import math -sys.setrecursionlimit(10**9) -# map(int, sys.stdin.read().split()) +# \n -    dp = [[0 for _ in range(N + 1)] for i in range(N + 1)]  # i枚投げたときの　j表が出た枚　のdpが確立 -    dp[0][0] = 1 -    for i in range(1, N + 1): -        for j in range(0, i + 1): -            dp[i][j] = dp[i - 1][j] * (1 - P[i - 1]) + dp[i - 1][j - 1] * P[i - 1] -    n = (N + 1) // 2 -    print((sum(dp[N][n:]))) -    pass +    dp = [0] * (N + 1) +    dp[0] = 1 +    for j in range(N): +        p = P[j] +        for i in range(N, -1, -1): +            dp[i] = dp[i] * (1 - p) +            if i == 0: +                continue +            dp[i] += dp[i - 1] * p +    print((sum(dp[N // 2 + 1 :])))