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); long[] items = new long[5]; for (int i = 0; i < n; i++) items[types[i] - 1 ]++; long max = long.MinValue; for( int i = 0; i < 5; i++ ) max = Math.Max( items[i], max ); var result = items.ToList().IndexOf( max ) + 1; Console.WriteLine( result ); } }