N = int(input()) L = [int(i) for i in input().split()] C = 0 num = 0 for i in range(1,7): if L.count(i) >= C: C = L.count(i) num = i print(num)