a=int(input()) b=[int(an) for an in input().strip().split(' ')] c={1:0,2:0,3:0,4:0,5:0} for x in range(a): c[b[x]]+=1 print (max(c,key=c.get))