import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int heighest = 0; int count = 0; for(int i = 0; i < n; i++){ int numb = scan.nextInt(); if(numb > heighest){ heighest = numb; count = 1; }else if(numb == heighest){ count++; } } System.out.println(count); } }