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[] typeCount = new int[5]; for (int i = 0; i < 5; i++) { typeCount[i]= types.Count(t => t == i+1); } int max = typeCount.Max(); int res=4; for (int i = 4; i >=0; i--) { res = typeCount[i] == max ? i : res; } Console.WriteLine(res+1); } }