using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static void Main(String[] elem) { int num = Convert.ToInt32(Console.ReadLine()); string[] temp = Console.ReadLine().Split(' '); int[] type= Array.ConvertAll(temp, Int32.Parse); int[] maxT = new int[5]; for (int i = 0; i < num; i++){ maxT[type[i]-1]++; } int max = maxT.Max(); int index = Array.IndexOf(maxT, max); index++; Console.WriteLine(index); } }