n = gets.to_i h = Hash.new 0 gets.split.map{|t| h[t.to_i]+=1 } max = 0 ans = 0 6.times{|i| if max <= h[i+1] max = h[i+1] ans = i+1 end } p ans