N = int(input()) L = list(map(int,input().split())) count = 0 Lv = 0 for i in range(1,7): if count <= L.count(i): count = L.count(i) Lv = i print(Lv)