N = int,input() L = map(int,input().split(' ')) S = sorted(L, reverse=True) import statistics print(statistics.mode(S))