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 sc = new Scanner(System.in); int n = sc.nextInt(); int[] hts = new int[n]; for(int i=0; i max) max = hts[i]; } int count = 0; for (int j = 0; j < hts.length; j++) { if (hts[j] == max) count++; } System.out.println(count); } //end main }//end solution