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[] bird_freq = { 0, 0, 0, 0, 0 }; for (int i=0; i < n; i++) { bird_freq[types[i] - 1] += 1; } int mode = 0; for (int i=1; i < n-1; i++) { if (bird_freq[i] > bird_freq[mode]) { mode = i; } } Console.WriteLine(mode + 1); } }