import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner sc = new Scanner(System.in); int totalCandles = sc.nextInt(); int[] candles = new int[totalCandles]; int tallest = 1; for (int i = 0; i < totalCandles; i++) { candles[i] = sc.nextInt(); tallest = Math.max(tallest, candles[i]); } int blownOut = 0; for (int i = 0; i < candles.length; i++) { if (candles[i] == tallest) { blownOut++; } } System.out.println(blownOut); } }