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 temp1 = 0 ; int temp2 = 0; int count = 0; int height[] = new int[n]; for(int height_i=0; height_i < n; height_i++){ height[height_i] = in.nextInt(); temp1 = height[height_i]; if(temp1 > temp2){ temp2 = temp1; } } for(int height_i=0; height_i < n; height_i++){ if(temp2 == height[height_i]){ count++; } } System.out.print(count); } }