import collections N = int(input()) L = list(map(int, input().split())) cnt = collections.Counter(L).most_common() print(max([v for v, c in cnt if c == cnt[0][1]]))