# @author 



import sys



class ICoins:

    def solve(self):

        n = int(eval(input()))

        p = [float(_) for _ in input().split()]

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

        # dp[i][j] probability of having i heads after j tosses

        dp[0][0] = 1

        for j in range(1, n + 1):

            for i in range(j + 1):

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

                if i > 0:

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



        ans = 0

        for i in range(n + 1):

            if i > n - i:

                ans += dp[i][n]

        print(ans)





solver = ICoins()

input = sys.stdin.readline



solver.solve()

# @author 



import sys



class ICoins:

    def solve(self):

        n = int(eval(input()))

        p = [float(_) for _ in input().split()]

        dp = [0.0] * (n + 1)

        # dp[i][j] probability of having i heads after j tosses

        dp[0] = 1

        for j in range(1, n + 1):

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

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

            dp[0] = dp[0] * (1 - p[j - 1])

        ans = 0

        for i in range(n + 1):

            if i > n - i:

                ans += dp[i]

        print(ans)





solver = ICoins()

input = sys.stdin.readline



solver.solve()

# @author
import sys


class ICoins:
    def solve(self):
        n = int(eval(input()))
        p = [float(_) for _ in input().split()]
        dp = [[0.0] * (n + 1) for _ in range(n + 1)]
        # dp[i][j] probability of having i heads after j tosses
        dp[0][0] = 1
        for j in range(1, n + 1):
            for i in range(j + 1):
                dp[i][j] = dp[i][j - 1] * (1 - p[j - 1])
                if i > 0:
                    dp[i][j] += dp[i - 1][j - 1] * p[j - 1]
        ans = 0
        for i in range(n + 1):
            if i > n - i:
                ans += dp[i][n]
        print(ans)


solver = ICoins()
input = sys.stdin.readline
solver.solve()

# @author
import sys


class ICoins:
    def solve(self):
        n = int(eval(input()))
        p = [float(_) for _ in input().split()]
        dp = [0.0] * (n + 1)
        # dp[i][j] probability of having i heads after j tosses
        dp[0] = 1
        for j in range(1, n + 1):
            for i in range(j, 0, -1):
                dp[i] = dp[i] * (1 - p[j - 1]) + dp[i - 1] * p[j - 1]
            dp[0] = dp[0] * (1 - p[j - 1])
        ans = 0
        for i in range(n + 1):
            if i > n - i:
                ans += dp[i]
        print(ans)


solver = ICoins()
input = sys.stdin.readline
solver.solve()

-        dp = [[0.0] * (n + 1) for _ in range(n + 1)] +        dp = [0.0] * (n + 1) -        dp[0][0] = 1 +        dp[0] = 1 -            for i in range(j + 1): -                dp[i][j] = dp[i][j - 1] * (1 - p[j - 1]) -                if i > 0: -                    dp[i][j] += dp[i - 1][j - 1] * p[j - 1] +            for i in range(j, 0, -1): +                dp[i] = dp[i] * (1 - p[j - 1]) + dp[i - 1] * p[j - 1] +            dp[0] = dp[0] * (1 - p[j - 1]) -                ans += dp[i][n] +                ans += dp[i]