n = gets.to_i a = gets.split.map &:to_i ans = Rational(1, 1) n.pred.times do |i| ans *= Rational(a[i], a[i + 1]) end puts 1 / ans