import sys

sys.setrecursionlimit(10 ** 6)



import functools

import operator

n = int(eval(input()))

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

half = n // 2 + 1



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

def dfs(n=half, depth=n - 1):

    if depth < 0:

        return 0



    if dp[n][depth] is not None:

        return dp[n][depth]



    if n == 0:

        r = functools.reduce(operator.mul, [1 - x for x in p[:depth + 1]])

    elif (n - 1) == depth:

        r = functools.reduce(operator.mul, p[:depth + 1])

    else:

        r = dfs(n - 1, depth - 1) * p[depth] + dfs(n, depth - 1) * (1 - p[depth])

    dp[n][depth] = r

    return r



print((sum(dfs(i) for i in range(half, n + 1))))

import sys

sys.setrecursionlimit(10 ** 6)



import functools

import operator

n = int(eval(input()))

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

half = n // 2 + 1



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

# def dfs(n, depth=n - 1):

#     if depth < 0:

#         return 0

#

#     if dp[n][depth] is not None:

#         return dp[n][depth]

#

#     if n == 0:

#         r = functools.reduce(operator.mul, map(lambda x: 1 - x, p[:depth + 1]))

#     elif (n - 1) == depth:

#         r = functools.reduce(operator.mul, p[:depth + 1])

#     else:

#         r = dfs(n - 1, depth - 1) * p[depth] + dfs(n, depth - 1) * (1 - p[depth])

#     dp[n][depth] = r

#     return r

#

# print(sum(dfs(i) for i in range(half, n + 1)))



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

    for depth in range(-1, n):

        if depth == -1:

            dp[i][depth] = 0

        elif i == 0:

            dp[i][depth] = functools.reduce(operator.mul, [1 - x for x in p[:depth + 1]])

        elif (i - 1) == depth:

            dp[i][depth] = functools.reduce(operator.mul, p[:depth + 1])

        else:

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



print((sum(dp[i][n - 1] for i in range(half, n + 1))))

import sys

sys.setrecursionlimit(10**6)
import functools
import operator

n = int(eval(input()))
p = list(map(float, input().split()))
half = n // 2 + 1
dp = [[None] * (n + 1) for _ in range(n + 1)]


def dfs(n=half, depth=n - 1):
    if depth < 0:
        return 0
    if dp[n][depth] is not None:
        return dp[n][depth]
    if n == 0:
        r = functools.reduce(operator.mul, [1 - x for x in p[: depth + 1]])
    elif (n - 1) == depth:
        r = functools.reduce(operator.mul, p[: depth + 1])
    else:
        r = dfs(n - 1, depth - 1) * p[depth] + dfs(n, depth - 1) * (1 - p[depth])
    dp[n][depth] = r
    return r


print((sum(dfs(i) for i in range(half, n + 1))))

import sys

sys.setrecursionlimit(10**6)
import functools
import operator

n = int(eval(input()))
p = list(map(float, input().split()))
half = n // 2 + 1
dp = [[None] * (n + 1) for _ in range(n + 1)]
# def dfs(n, depth=n - 1):
#     if depth < 0:
#         return 0
#
#     if dp[n][depth] is not None:
#         return dp[n][depth]
#
#     if n == 0:
#         r = functools.reduce(operator.mul, map(lambda x: 1 - x, p[:depth + 1]))
#     elif (n - 1) == depth:
#         r = functools.reduce(operator.mul, p[:depth + 1])
#     else:
#         r = dfs(n - 1, depth - 1) * p[depth] + dfs(n, depth - 1) * (1 - p[depth])
#     dp[n][depth] = r
#     return r
#
# print(sum(dfs(i) for i in range(half, n + 1)))
for i in range(0, n + 1):
    for depth in range(-1, n):
        if depth == -1:
            dp[i][depth] = 0
        elif i == 0:
            dp[i][depth] = functools.reduce(
                operator.mul, [1 - x for x in p[: depth + 1]]
            )
        elif (i - 1) == depth:
            dp[i][depth] = functools.reduce(operator.mul, p[: depth + 1])
        else:
            dp[i][depth] = dp[i - 1][depth - 1] * p[depth] + dp[i][depth - 1] * (
                1 - p[depth]
            )
print((sum(dp[i][n - 1] for i in range(half, n + 1))))

- - -def dfs(n=half, depth=n - 1): -    if depth < 0: -        return 0 -    if dp[n][depth] is not None: -        return dp[n][depth] -    if n == 0: -        r = functools.reduce(operator.mul, [1 - x for x in p[: depth + 1]]) -    elif (n - 1) == depth: -        r = functools.reduce(operator.mul, p[: depth + 1]) -    else: -        r = dfs(n - 1, depth - 1) * p[depth] + dfs(n, depth - 1) * (1 - p[depth]) -    dp[n][depth] = r -    return r - - -print((sum(dfs(i) for i in range(half, n + 1)))) +# def dfs(n, depth=n - 1): +#     if depth < 0: +#         return 0 +# +#     if dp[n][depth] is not None: +#         return dp[n][depth] +# +#     if n == 0: +#         r = functools.reduce(operator.mul, map(lambda x: 1 - x, p[:depth + 1])) +#     elif (n - 1) == depth: +#         r = functools.reduce(operator.mul, p[:depth + 1]) +#     else: +#         r = dfs(n - 1, depth - 1) * p[depth] + dfs(n, depth - 1) * (1 - p[depth]) +#     dp[n][depth] = r +#     return r +# +# print(sum(dfs(i) for i in range(half, n + 1))) +for i in range(0, n + 1): +    for depth in range(-1, n): +        if depth == -1: +            dp[i][depth] = 0 +        elif i == 0: +            dp[i][depth] = functools.reduce( +                operator.mul, [1 - x for x in p[: depth + 1]] +            ) +        elif (i - 1) == depth: +            dp[i][depth] = functools.reduce(operator.mul, p[: depth + 1]) +        else: +            dp[i][depth] = dp[i - 1][depth - 1] * p[depth] + dp[i][depth - 1] * ( +                1 - p[depth] +            ) +print((sum(dp[i][n - 1] for i in range(half, n + 1))))