from collections import Counter N, *L = map(int, open(0).read().split()) C = Counter(L) print(C.most_common(1)[0][0])