n = gets.to_i
coin = gets.chomp.split.map(&:to_f)
dp = Array.new(n+1).map{Array.new(n+1, 0.0)}
dp[0][0] = 1.0
(1..n).each {|i| (0..i).each {|j| dp[i-j][j] = dp[i-j-1][j]*(1-coin[i-1]) + dp[i-j][j-1]*coin[i-1]}}
ans = 0.0
((n+1)/2).times {|i| ans += dp[i][n-i]}
puts ans
