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[] types_temp = Console.ReadLine().Split(' '); int[] types = Array.ConvertAll(types_temp,Int32.Parse); // your code goes here int[] birds_counted = new int[5]; for (int i = 0; i < n; i++) { birds_counted[types[i] - 1]++; } int max = birds_counted[0]; int type = 1; for (int i = 1; i < 5; i++) { if (birds_counted[i] > max) { max = birds_counted[i]; type = i + 1; } } Console.WriteLine(type); } }