N = gets.to_i A = gets.split.map(&:to_i) puts 1000 - A.inject(1000.0) { |e, a| e *= Rational(1000 - a, 1000.0) }.to_f.round(12)