'use strict'

getHeadsSuperior(require('fs').readFileSync('/dev/stdin', 'utf8'))

function getHeadsSuperior(input) {
    const lines = input.split('\n')
    const n = parseInt(lines.shift())
    let probabilities = lines.shift().split(' ').map(item => parseFloat(item))
    let dp = new Array(n + 1)
    for (let i = 0; i <= n; i++){
        dp[i] = new Array(n + 1).fill(0.0)
    }
    dp[0][0] = 1
    for (let i = 1; i <= n; i++) {
        for (let j = 0; j <= n; j++) {
            dp[i][j] = dp[i - 1][j] * (1 - probabilities[i - 1])
            if (j > 0) {
                dp[i][j] += dp[i - 1][j - 1] * probabilities[i - 1]
            }
        }
    }
    let result = 0.0
    for (let i = Math.ceil(n / 2); i <= n; i++) {
        result += dp[n][i]
    }
    console.log(result)
}