#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here #n - number of birds #types list of bird types #freq = list(0,0,0,0,0) #frequency of each type def howFrequent(n,types): freq = [0,0,0,0,0] for i in types: freq[i-1]+=1 #print("hi") #print(freq) return freq #then check for highest frequency def hightestFrequency(freq, n): #print("hi") #print(max(freq)) for i in range(n): if freq[i] == max(freq): return (i+1) print(hightestFrequency(howFrequent(n,types), n))