local n = io.read("*n")
local rate = {}
for i = 1, n do
  rate[i] = 0
end
local p0 = 1
for i = 1, n do
  local t = io.read("*n")
  for j = n - 1, 1, -1 do
    rate[j + 1] = rate[j + 1] + rate[j] * t
    rate[j] = rate[j] * (1 - t)
  end
  rate[1] = rate[1] + t * p0
  p0 = p0 * (1 - t)
end
local hn = math.ceil(n / 2)
local p = 0
for i = hn, n do
  p = p + rate[i]
end
print(p)
