def main():

    N = int(eval(input()))

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

    u = [0.0]

    v = [1 - p[0], p[0]]

    for i, p in enumerate(p[1:], 1):

        u, v = v, u + [0.0, 0.0]

        t = u[0]

        v[0] = t * (1 - p)

        for j, uu in enumerate(u[1:], 1):

            v[j] = t * p + uu * (1 - p)

            t = uu

        v[-1] = t * p

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



main()

def main():

    N = int(eval(input()))

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

    v = [1 - pl[0], pl[0]]

    mid = (N + 1) // 2

    for i, p in enumerate(pl[1:mid], 1):

        v = v + [0.0]

        t = v[0]

        v[0] = t * (1 - p)

        for j, uu in enumerate(v[1:], 1):

            v[j] = t * p + uu * (1 - p)

            t = uu

    for i, p in enumerate(pl[mid:], mid):

        t = v[i - mid + 1]

        for j, uu in enumerate(v[i - mid + 2:-1], i - mid + 2):

            v[j] = t * p + uu * (1 - p)

            t = uu

        v[mid] += t * p

    print((v[mid]))



main()

def main():
    N = int(eval(input()))
    p = list(map(float, input().split()))
    u = [0.0]
    v = [1 - p[0], p[0]]
    for i, p in enumerate(p[1:], 1):
        u, v = v, u + [0.0, 0.0]
        t = u[0]
        v[0] = t * (1 - p)
        for j, uu in enumerate(u[1:], 1):
            v[j] = t * p + uu * (1 - p)
            t = uu
        v[-1] = t * p
    print((sum(v[(N + 1) // 2 :])))


main()

def main():
    N = int(eval(input()))
    pl = list(map(float, input().split()))
    v = [1 - pl[0], pl[0]]
    mid = (N + 1) // 2
    for i, p in enumerate(pl[1:mid], 1):
        v = v + [0.0]
        t = v[0]
        v[0] = t * (1 - p)
        for j, uu in enumerate(v[1:], 1):
            v[j] = t * p + uu * (1 - p)
            t = uu
    for i, p in enumerate(pl[mid:], mid):
        t = v[i - mid + 1]
        for j, uu in enumerate(v[i - mid + 2 : -1], i - mid + 2):
            v[j] = t * p + uu * (1 - p)
            t = uu
        v[mid] += t * p
    print((v[mid]))


main()

-    p = list(map(float, input().split())) -    u = [0.0] -    v = [1 - p[0], p[0]] -    for i, p in enumerate(p[1:], 1): -        u, v = v, u + [0.0, 0.0] -        t = u[0] +    pl = list(map(float, input().split())) +    v = [1 - pl[0], pl[0]] +    mid = (N + 1) // 2 +    for i, p in enumerate(pl[1:mid], 1): +        v = v + [0.0] +        t = v[0] -        for j, uu in enumerate(u[1:], 1): +        for j, uu in enumerate(v[1:], 1): -        v[-1] = t * p -    print((sum(v[(N + 1) // 2 :]))) +    for i, p in enumerate(pl[mid:], mid): +        t = v[i - mid + 1] +        for j, uu in enumerate(v[i - mid + 2 : -1], i - mid + 2): +            v[j] = t * p + uu * (1 - p) +            t = uu +        v[mid] += t * p +    print((v[mid]))