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 tallest = 0; int count = 0; int height[] = new int[n]; for(int i=0; i < n; i++){ height[i] = in.nextInt(); if (height[i] > tallest) { tallest = height[i]; count = 1; } else if (height[i] == tallest) { count++; } } System.out.println(count); } }