#!/bin/ruby n = gets.strip.to_i height = gets.strip height = height.split(' ').map(&:to_i) puts height.group_by{|x|x}.max.last.count