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
n.times {|i|
   (i+2).times {|j|
      dp[i-j+1][j] = dp[i-j][j]*(1.0 - coin[i]) + dp[i-j+1][j-1]*coin[i]
      dp[i-j][j-1] = 0.0}}
ans = 0.0
((n+1)/2).times {|i| ans += dp[i][n-i]}
puts ans
