using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static void Main(String[] args) { int n = Convert.ToInt32(Console.ReadLine()); string[] height_temp = Console.ReadLine().Split(' '); int[] height = Array.ConvertAll(height_temp,Int32.Parse); int highest = 0; int total = 0; foreach (var num in height) { if (num > highest) { highest = num; total = 1; } else if (num == highest) { total++; } } Console.WriteLine(total); } }