let N = Int(readLine()!)!

let p = readLine()!.split(separator: " ").map { Double($0)! }

var dp: [[Double]] = .init(repeating: .init(repeating: 0, count: N+1), count: N+1)
dp[0][0] = 1.0
for i in 1...N {
  for j in 0...i {
    dp[i][j] = (j == 0) ? dp[i-1][0] * (1.0 - p[i-1]) : dp[i-1][j-1] * p[i-1] + dp[i-1][j] * (1.0 - p[i-1]) 
  }
}
var sum: Double = 0.0
for j in (N+1)/2...N {
  sum += dp[N][j]
}
print(sum)