n = int(input()) count = [0] * 6 for i in map(int, input().split()): count[i - 1] += 1 print(count.index(max(count)) + 1)