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 sc = new Scanner(System.in); int numBlew = 0; int numCandles = sc.nextInt(); int[] candleHeights = new int[numCandles]; for (int i = 0 ; i < numCandles ; i++){ candleHeights[i] = sc.nextInt(); } int largestHeight = candleHeights[0]; for (int i = 0 ; i < numCandles ; i++){ if (candleHeights[i] > largestHeight){ largestHeight = candleHeights[i]; } else if (candleHeights[i] == largestHeight){ numBlew++; } } System.out.println(numBlew); } }