n = int(input()) l = list(map(int, input().split())) l.sort() ans = 0 max_num = 0 tmp = 0 before = 0 for num in l: if before == num: tmp += 1 else: if max_num <= tmp: ans = before max_num = tmp tmp = 0 before = num if max_num <= tmp: ans = before max_num = tmp print(ans)