using System; namespace yukicoder { class Program { static void Main(string[] args) { int a = int.Parse(Console.ReadLine()); string[] s = Console.ReadLine().Trim().Split(' '); int b; int[] c = new int[a]; int ans = 0; int count = 0; for (int i = 0; i < a; i++) { b = int.Parse(s[i]); for (int j = 0; j <= a; j++) { if (b == j+1) { c[j]++; } } if (c[i] >= count) { ans = i; count = c[i]; } } Console.WriteLine(ans + 1); } } }