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 max = 0; int cnt = 0; foreach (int h in height) { if (h > max) { max = h; cnt = 1; } else if (h == max) { cnt++; } } Console.WriteLine(cnt); } }