# Enter your code here. Read input from STDIN. Print output to STDOUT n = gets.to_i candles = gets.split(' ').map(&:to_i) tallest = candles.max total = candles.select{|c| c == tallest}.size puts total