# coding: utf-8

import sys

input = sys.stdin.readline



def f2(n, p):

    dp = [ 0.0 ] * (n + 1)

    dp[0] = 1.0

    # pprint.pprint(dp, width = 50)

    for i in range(n):

        dp_ = list(dp)

        pi_ = 1 - p[i]

        for j in range(n + 1):

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

        # pprint.pprint(dp, width = 50)

    return(sum(dp[n // 2 + 1:]))



n = int(eval(input())) # n: odd, 1 <= n <= 2999

p = list(map(float, input().split())) # 0 < pi[i] < 1

print((f2(n, p)))

import sys



# input処理を高速化する

input = sys.stdin.readline



def main():

    N = int(eval(input()))

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



    # dp[j] := 表が j 枚となる確率

    # dp[j] = dp[j-1]*p[i] + dp[j]*(1-p[i]) ただしdp[j]が重複していることに注意

    dp = [0.0] * (N+1)

    # 初期条件

    dp[0]= 1.0



    for i in range(N):

        p_head = p[i]

        p_tail = 1 - p[i]

        dp = [dp[j -1] * p_head + dp[j] * p_tail for j in range(N+1)]

    

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



    print(ans)



main()
# coding: utf-8
import sys

input = sys.stdin.readline


def f2(n, p):
    dp = [0.0] * (n + 1)
    dp[0] = 1.0
    # pprint.pprint(dp, width = 50)
    for i in range(n):
        dp_ = list(dp)
        pi_ = 1 - p[i]
        for j in range(n + 1):
            dp[j] = dp_[j - 1] * p[i] + dp_[j] * pi_
        # pprint.pprint(dp, width = 50)
    return sum(dp[n // 2 + 1 :])


n = int(eval(input()))  # n: odd, 1 <= n <= 2999
p = list(map(float, input().split()))  # 0 < pi[i] < 1
print((f2(n, p)))

import sys

# input処理を高速化する
input = sys.stdin.readline


def main():
    N = int(eval(input()))
    p = list(map(float, input().split()))
    # dp[j] := 表が j 枚となる確率
    # dp[j] = dp[j-1]*p[i] + dp[j]*(1-p[i]) ただしdp[j]が重複していることに注意
    dp = [0.0] * (N + 1)
    # 初期条件
    dp[0] = 1.0
    for i in range(N):
        p_head = p[i]
        p_tail = 1 - p[i]
        dp = [dp[j - 1] * p_head + dp[j] * p_tail for j in range(N + 1)]
    ans = sum(dp[(N // 2 + 1) :])
    print(ans)


main()

-# coding: utf-8 +# input処理を高速化する -def f2(n, p): -    dp = [0.0] * (n + 1) +def main(): +    N = int(eval(input())) +    p = list(map(float, input().split())) +    # dp[j] := 表が j 枚となる確率 +    # dp[j] = dp[j-1]*p[i] + dp[j]*(1-p[i]) ただしdp[j]が重複していることに注意 +    dp = [0.0] * (N + 1) +    # 初期条件 -    # pprint.pprint(dp, width = 50) -    for i in range(n): -        dp_ = list(dp) -        pi_ = 1 - p[i] -        for j in range(n + 1): -            dp[j] = dp_[j - 1] * p[i] + dp_[j] * pi_ -        # pprint.pprint(dp, width = 50) -    return sum(dp[n // 2 + 1 :]) +    for i in range(N): +        p_head = p[i] +        p_tail = 1 - p[i] +        dp = [dp[j - 1] * p_head + dp[j] * p_tail for j in range(N + 1)] +    ans = sum(dp[(N // 2 + 1) :]) +    print(ans) -n = int(eval(input()))  # n: odd, 1 <= n <= 2999 -p = list(map(float, input().split()))  # 0 < pi[i] < 1 -print((f2(n, p))) +main()