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 if(n<5 || n>2*100000) return; var type1= types.Count(x=> x==1); var type2= types.Count(x=> x==2); var type3= types.Count(x=> x==3); var type4= types.Count(x=> x==4); var type5= types.Count(x=> x==5); int [] fina=new int[]{Convert.ToInt32(type1),Convert.ToInt32(type2),Convert.ToInt32(type3),Convert.ToInt32(type4),Convert.ToInt32(type5)}; var ty= fina.ToList().IndexOf(fina.Max()); Console.WriteLine((Convert.ToInt32(ty)+1).ToString()); } }