N,*P = `dd`.split.map &:to_f

dp = (0..P.size).map{ Array.new(P.size+1, 0.0) }
dp[0][0] = 1.0
(0...P.size).each{ |n|
  (0..n).each{ |k|
  #p [n,k,P[n]]
  dp[n+1][k] += dp[n][k] * (1 - P[n])
  dp[n+1][k+1] += dp[n][k] * P[n]
  }
}
p (0..P.size).select{ |k| k > N/2 }.map{ |k| dp[-1][k] }.inject(:+)