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 birdType = 1; var maxCount = types.Count(x => x == 1); if(maxCount < types.Count(x => x == 2)) { maxCount = types.Count(x => x == 2); birdType = 2; } if(maxCount < types.Count(x => x == 3)) { maxCount = types.Count(x => x == 3); birdType = 3; } if(maxCount < types.Count(x => x == 4)) { maxCount = types.Count(x => x == 4); birdType = 4; } if(maxCount < types.Count(x => x == 5)) { maxCount = types.Count(x => x == 5); birdType = 5; } Console.WriteLine(birdType.ToString()); } }