input() c = [0]*6 for l in map(int, input().split()): c[l-1] += 1 ma = lv = 0 for i in range(6): if c[i] >= ma: ma = c[i] lv = i+1 print(lv)