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); // Get the maximum height. int max = height.Max(); // Get the count for the number of elements that have the max value in the array. int count = height.Count(element => element == max); Console.WriteLine(count); } }