def solve():

    N = int(eval(input()))

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



    Qs = [1-P for P in Ps]



    dp = [0.0] * (N+2)

    dp[0] = 1.0

    for P, Q in zip(Ps, Qs):

        dp2 = [0.0] * (N+2)

        for j in range(N+1):

            if dp[j] == 0.0: continue

            dp2[j] += dp[j] * Q

            dp2[j+1] += dp[j] * P

        dp = dp2



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





solve()

def solve():

    N = int(eval(input()))

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



    Qs = [1-P for P in Ps]



    dp = [0.0] * (N+2)

    dp[0] = 1.0

    for i, (P, Q) in enumerate(zip(Ps, Qs)):

        dp2 = [0.0] * (N+2)

        for j in range(i+1):

            dp2[j] += dp[j] * Q

            dp2[j+1] += dp[j] * P

        dp = dp2



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





solve()

def solve():
    N = int(eval(input()))
    Ps = list(map(float, input().split()))
    Qs = [1 - P for P in Ps]
    dp = [0.0] * (N + 2)
    dp[0] = 1.0
    for P, Q in zip(Ps, Qs):
        dp2 = [0.0] * (N + 2)
        for j in range(N + 1):
            if dp[j] == 0.0:
                continue
            dp2[j] += dp[j] * Q
            dp2[j + 1] += dp[j] * P
        dp = dp2
    print((sum(dp[(N + 1) // 2 :])))


solve()

def solve():
    N = int(eval(input()))
    Ps = list(map(float, input().split()))
    Qs = [1 - P for P in Ps]
    dp = [0.0] * (N + 2)
    dp[0] = 1.0
    for i, (P, Q) in enumerate(zip(Ps, Qs)):
        dp2 = [0.0] * (N + 2)
        for j in range(i + 1):
            dp2[j] += dp[j] * Q
            dp2[j + 1] += dp[j] * P
        dp = dp2
    print((sum(dp[(N + 1) // 2 :])))


solve()

-    for P, Q in zip(Ps, Qs): +    for i, (P, Q) in enumerate(zip(Ps, Qs)): -        for j in range(N + 1): -            if dp[j] == 0.0: -                continue +        for j in range(i + 1):