import java.io.*; import java.util.*; public class Solution { public static void main(String[] args)throws Exception { int n; Scanner in=new Scanner(System.in); HashMap map=new HashMap(); n=in.nextInt(); int[] a=new int[n]; int max=-9; for(int i=0;imax) max=a[i]; if(!map.containsKey(a[i])) map.put(new Integer(a[i]),new Integer(1)); else { int k=(int)map.get(a[i]); k++; map.put(new Integer(a[i]),new Integer(k)); } } int r; r=(int)map.get(new Integer(max)); System.out.println(r); } }