# Enter your code here. Read input from STDIN. Print output to STDOUT n = gets.strip.to_i c = gets.strip.split(' ').map(&:to_i) max_height = c.sort.last puts c.select {|k| k == max_height }.size