#!/bin/ruby n = gets.strip.to_i height = gets.strip height = height.split(' ').map(&:to_i) max_height = height.max counts = Array.new(max_height + 1, 0) height.each {|h|counts[h] += 1 } puts (counts - [0]).last