n = gets.to_i
m = n / 2 + 1
q = gets.split.map(&:to_r)

d = Array.new(m, 0)
d[0] = 1
u = Array.new(m)
ans = 0
q.each do |e|
    m.times {|i| u[i] = d[i] * (1 - e)}
    (m-1).times {|i| u[i+1] += d[i] * e}
    ans += d[m-1] * e
    d, u = u, d
end

p ans.to_f