#!/usr/bin/env python2

"""

This file is part of https://github.com/cheran-senthil/PyRival

Copyright 2019 Cheran Senthilkumar <hello@cheran.io>



"""





import itertools

import math

import os

import sys

from atexit import register

from io import BytesIO





class dict(dict):

    """dict() -> new empty dictionary"""



    def items(self):

        """D.items() -> a set-like object providing a view on D's items"""

        return dict.iteritems(self)



    def keys(self):

        """D.keys() -> a set-like object providing a view on D's keys"""

        return dict.iterkeys(self)



    def values(self):

        """D.values() -> an object providing a view on D's values"""

        return dict.itervalues(self)





def gcd(x, y):

    """greatest common divisor of x and y"""

    while y:

        x, y = y, x % y

    return x





range = xrange



filter = itertools.ifilter

map = itertools.imap

zip = itertools.izip



sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))

sys.stdout = BytesIO()

register(lambda: os.write(1, sys.stdout.getvalue()))



input = lambda: sys.stdin.readline().rstrip('\r\n')



n = int(eval(input()))

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



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

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



for i in range(1, n):

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

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

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



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

#!/usr/bin/env python2





import os

import sys

from atexit import register

from io import BytesIO



range = xrange



sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))

sys.stdout = BytesIO()

register(lambda: os.write(1, sys.stdout.getvalue()))



input = lambda: sys.stdin.readline().rstrip('\r\n')



n = int(eval(input()))

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



dp = [0.0] * (n + 1)

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



for i in range(1, n):

    _dp = [0.0] * (n + 1)

    _dp[0] = (1 - p[i]) * dp[0]

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

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

    dp = _dp



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

#!/usr/bin/env python2
"""
This file is part of https://github.com/cheran-senthil/PyRival
Copyright 2019 Cheran Senthilkumar <hello@cheran.io>
"""
import itertools
import math
import os
import sys
from atexit import register
from io import BytesIO


class dict(dict):
    """dict() -> new empty dictionary"""

    def items(self):
        """D.items() -> a set-like object providing a view on D's items"""
        return dict.iteritems(self)

    def keys(self):
        """D.keys() -> a set-like object providing a view on D's keys"""
        return dict.iterkeys(self)

    def values(self):
        """D.values() -> an object providing a view on D's values"""
        return dict.itervalues(self)


def gcd(x, y):
    """greatest common divisor of x and y"""
    while y:
        x, y = y, x % y
    return x


range = xrange
filter = itertools.ifilter
map = itertools.imap
zip = itertools.izip
sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))
sys.stdout = BytesIO()
register(lambda: os.write(1, sys.stdout.getvalue()))
input = lambda: sys.stdin.readline().rstrip("\r\n")
n = int(eval(input()))
p = [float(i) for i in input().split()]
dp = [[0.0] * (n + 1) for _ in range(n)]
dp[0][0], dp[0][1] = 1 - p[0], p[0]
for i in range(1, n):
    dp[i][0] = (1 - p[i]) * dp[i - 1][0]
    for j in range(1, n + 1):
        dp[i][j] = (p[i] * dp[i - 1][j - 1]) + ((1 - p[i]) * dp[i - 1][j])
print(sum(dp[-1][(n + 1) // 2 :]))

#!/usr/bin/env python2
import os
import sys
from atexit import register
from io import BytesIO

range = xrange
sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))
sys.stdout = BytesIO()
register(lambda: os.write(1, sys.stdout.getvalue()))
input = lambda: sys.stdin.readline().rstrip("\r\n")
n = int(eval(input()))
p = [float(i) for i in input().split()]
dp = [0.0] * (n + 1)
dp[0], dp[1] = 1 - p[0], p[0]
for i in range(1, n):
    _dp = [0.0] * (n + 1)
    _dp[0] = (1 - p[i]) * dp[0]
    for j in range(1, n + 1):
        _dp[j] = (p[i] * dp[j - 1]) + ((1 - p[i]) * dp[j])
    dp = _dp
print(sum(dp[(n + 1) // 2 :]))

-""" -This file is part of https://github.com/cheran-senthil/PyRival -Copyright 2019 Cheran Senthilkumar <hello@cheran.io> -""" -import itertools -import math - -class dict(dict): -    """dict() -> new empty dictionary""" - -    def items(self): -        """D.items() -> a set-like object providing a view on D's items""" -        return dict.iteritems(self) - -    def keys(self): -        """D.keys() -> a set-like object providing a view on D's keys""" -        return dict.iterkeys(self) - -    def values(self): -        """D.values() -> an object providing a view on D's values""" -        return dict.itervalues(self) - - -def gcd(x, y): -    """greatest common divisor of x and y""" -    while y: -        x, y = y, x % y -    return x - - -filter = itertools.ifilter -map = itertools.imap -zip = itertools.izip -dp = [[0.0] * (n + 1) for _ in range(n)] -dp[0][0], dp[0][1] = 1 - p[0], p[0] +dp = [0.0] * (n + 1) +dp[0], dp[1] = 1 - p[0], p[0] -    dp[i][0] = (1 - p[i]) * dp[i - 1][0] +    _dp = [0.0] * (n + 1) +    _dp[0] = (1 - p[i]) * dp[0] -        dp[i][j] = (p[i] * dp[i - 1][j - 1]) + ((1 - p[i]) * dp[i - 1][j]) -print(sum(dp[-1][(n + 1) // 2 :])) +        _dp[j] = (p[i] * dp[j - 1]) + ((1 - p[i]) * dp[j]) +    dp = _dp +print(sum(dp[(n + 1) // 2 :]))