using System; using System.Collections.Generic; using System.IO; class Solution { static void Main(String[] args) { long n = long.Parse(Console.ReadLine()); string[] inputHeights = Console.ReadLine().Split(' '); long[] Heights = Array.ConvertAll(inputHeights,long.Parse); long temp = Heights[0]; long count = 1; for (int i = 1; i < n; i++) { if (Heights[i] > temp) { temp = Heights[i]; count = 1; } else if (Heights[i] == temp) { count++; } } Console.WriteLine(count); } }