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); int[] freq = new int[5]; // your code goes here for(int i = 0; i < n; i++){ freq[types[i]-1]++; } int max = 0; int type = 0; for(int i = 0; i < 5; i++){ if(freq[i] > max){ max = freq[i]; type = i+1; } } Console.WriteLine(type); } }