using System; using System.Collections.Generic; using System.IO; class Solution { static void Main(String[] args) { int n = Convert.ToInt32(Console.ReadLine()); string[] arrHeight = Console.ReadLine().Split(' '); int[] arr = Array.ConvertAll(arrHeight, Int32.Parse); int max = 0; int numberOfCandles = 0; for (int i = 0; i < n; i++) { if (arr[i] > max) { max = arr[i]; } } for (int i = 0; i < n; i++) { if (arr[i] == max) { numberOfCandles++; } } Console.WriteLine(numberOfCandles); //Console.ReadKey(); } }