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