N = int(input()) Ls = list(map(int, input().split())) freq = [0] * 7 for l in Ls: freq[l] += 1 fmax = max(freq) for i in range(6, 0, -1): if freq[i] == fmax: print(i) break