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 in = new Scanner(System.in); int n = in.nextInt(); int maxHeight = 0; int[] candles = new int[n]; for(int i = 0; i < n; i++){ int temp = in.nextInt(); candles[i] = temp; if(temp > maxHeight){ maxHeight = temp; } } int count = 0; for(int i = 0; i < candles.length; i++){ if(candles[i] == maxHeight){ count++; } } System.out.println(count); } }