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(); List heights = new LinkedList<>(); for(int height_i=0; height_i < n; height_i++){ heights.add(height_i, in.nextInt()); } int max = Collections.max(heights); int count = 0; for (Integer i : heights) if (i == max) count++; System.out.println(count); } }