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); Dictionary map = new Dictionary(); List keys = new List(); foreach(int entry in height) { keys.Add(entry); if (map.Count == 0) { map.Add(entry, 1); } else { if (!map.ContainsKey(entry)) { map.Add(entry, 1); } else map[entry]++; } } int max = keys.Max(); Console.Out.Write(map[max]); } }