N = gets.chomp.to_i Ls = gets.chomp.split.map(&:to_i) puts Ls.sort.reverse.group_by(&:itself).max_by{|_,v| v.size}.first