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[] counts = new int[6]; foreach (int type in types) { counts[type]++; } int maxvalue = counts.Max(); Console.WriteLine( Array.IndexOf(counts, maxvalue)); } }