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]; int tallest = 0; int count = 0; int temp = 0; for(int height_i=0; height_i < n; height_i++){ height[height_i] = in.nextInt(); temp = height[height_i]; // Check and compare value in array for tallest if(temp > tallest){ tallest = temp; } } // Count how many tallest value for(int index = 0; index < height.length; index++){ if(height[index] == tallest){ count++; } } System.out.println(count); } }