N = gets.chomp.to_i Ls = gets.chomp.split.map(&:to_i) pp Ls.tally.sort_by{ _2 }.last.first