using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace template { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray(); int[] a = new int[7]; for (int i = 0; i < n; i++) { a[x[i]]++; } int ret = 0; int value = -1; for (int i = 1; i <= 6; i++) { if (value <= a[i]) { ret = i; value = a[i]; } } Console.WriteLine(ret); } } }