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[] totals = new int[5]; totals[0] = 0; totals[1] = 0; totals[2] = 0; totals[3] = 0; totals[4] = 0; for (int i = 0; i < n; i++) { totals[types[i] - 1] = totals[types[i] - 1] + 1; } int maxInd = 0; for (int j = 1; j < 5; j++) { if(totals[j] > totals[maxInd]) maxInd = j; } Console.WriteLine(maxInd + 1); } }