using System; using System.Collections.Generic; using System.IO; class Solution { static void Main(String[] args) { int n = Convert.ToInt32(Console.ReadLine()); string[] arr_temp = Console.ReadLine().Split(' '); int[] arr = Array.ConvertAll(arr_temp, Int32.Parse); int valueMax = 0; int value = 0; valueMax = arr[0]; for (int k = 0; k < arr.Length ; k++) { if (arr[k] > valueMax) { valueMax = arr[k]; value = 1; } else if (arr[k] == valueMax) { value++; } } Console.WriteLine(value.ToString()); } }