import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int maxh=-1, count =0; for(int i =0; i< n; i++) { int data = scan.nextInt(); if(data> maxh) { maxh = data; count= 1; } else if(data == maxh) { count++; } } System.out.println(count); } }