gets puts gets.split.map(&:to_i).inject(Hash.new(0)){|h,v| h[v]+=1;h}.sort{|a,b| b[1] <=> a[1]}[0][1]