n = io.read("*n") r = 1 for i = 1, n - 1 do a = io.read("*n") r = r * (1000 - a) / 1000 end z = string.format("%.10f", 1000 * (1 - r)) print(z)