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) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner in = new Scanner(System.in); int count = in.nextInt(); in.nextLine(); int blowOutCount = 0; int tallest = 0; int height; int[] arr = new int[count]; for(int i = 0; i < count; i++){ height = in.nextInt(); if(height > tallest){ blowOutCount = 1; tallest = height; }else if(height == tallest){ blowOutCount++; } } System.out.println(blowOutCount); } }