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) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int height[] = new int[n]; for(int height_i=0; height_i < n; height_i++){ height[height_i] = in.nextInt(); } System.out.println(findNumberOfTallestCandles(height)); } private static int findTheTallest(int[] height) { int max = height[0]; for(int i = 1; i < height.length; i++) { if(max < height[i]) max = height[i]; } return max; } private static int findNumberOfTallestCandles(int[] height) { int tallest = findTheTallest(height); int count = 0; for(int i = 0; i < height.length; i++) { if(tallest == height[i]) count++; } return count; } }