import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int numberOfCandles = scanner.nextInt(); int tallest = 0; int candlesBlownOut = 0; for (int i = 0; i < numberOfCandles; i++) { int height = scanner.nextInt(); if (height > tallest) { tallest = height; candlesBlownOut = 1; } else if (height == tallest) { candlesBlownOut++; } } System.out.println(candlesBlownOut); } }