using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ForYukicoder { class Program { //過小評価ダメ・ゼッタイ static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); int[] L = Console.ReadLine().Split().Select(int.Parse).ToArray(); int[] level = new int[6] { 0, 0, 0, 0, 0, 0 }; for (int i = 0; i < N; i++) { level[L[i] - 1]++; } int max = level.Max(); int ans = Array.LastIndexOf(level, max) + 1; Console.WriteLine(ans); } } }