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 input = new Scanner(System.in); int numberOfCandles = 0; int n = input.nextInt(); int[] candles = new int[n]; for(int i = 0; i < n; i++) candles[i] = input.nextInt(); int height = candles[0]; for(int k = 0; k < n; k++) if(candles[k] > height) height = candles[k]; for(int j = 0; j < n; j++) if(candles[j] == height) numberOfCandles++; System.out.println(numberOfCandles); } }