using System; using System.IO; class Solution { static void Main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution */ string candleHeights = string.Empty; int numberOfCandles = Convert.ToInt32(Console.ReadLine()); int tallestSoFar = 0; int maxCount = 0; int height = 0; candleHeights = Console.ReadLine(); string[] candleHeightsArray = candleHeights.Split(' '); for (int candleIndex = 0; candleIndex < numberOfCandles; candleIndex++) { height = Convert.ToInt32(candleHeightsArray[candleIndex]); if (height > tallestSoFar) { tallestSoFar = height; maxCount = 0; } if (height == tallestSoFar) { maxCount++; } } Console.WriteLine(maxCount); } }