import java.io.*; import java.util.*; 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 s = new Scanner(System.in); int numCandles = s.nextInt(); int[] candles = new int[numCandles]; int maxHeight = 0; int blowOut = 0; for(int i = 0; i < numCandles; i++) { candles[i] = s.nextInt(); if(candles[i] > maxHeight) maxHeight = candles[i]; } for(int i = 0; i < numCandles; i++) { if(candles[i] == maxHeight) blowOut++; } System.out.println(blowOut); } }