import Data.Array
import qualified Data.Vector.Unboxed as VU
import qualified Data.ByteString.Char8 as BS
import Control.Monad
import Data.List

solve :: VU.Vector Double -> Int -> Array (Int,Int) Double
solve ps n = dp
    where
        dp :: Array (Int,Int) Double
        dp = listArray ((0,0),(n,n)) [ f i j | i <- [0..n], j <- [0..n]]
        
        f :: Int -> Int -> Double
        f 0 0 = 1
        f _ 0 = 0
        f 0 j = dp ! (0,j-1) * (1 - p j)
        f i j
            | i == j = (dp ! (i-1,j-1)) * p j
            | otherwise = (dp ! (i-1,j-1) * p j) + (dp ! (i,j-1) * (1 - p j)) 
        p n = ps VU.! (n-1)

main = do
    n <- readLn :: IO Int
    ps <- VU.fromListN n . map (read . BS.unpack) . BS.words <$> BS.getLine :: IO (VU.Vector Double)
    let dp = solve ps n
    print $ foldl' (\acc i -> dp ! (i,n) + acc) 0.0 [n `rem` 2 + 1..n]