import statistics a=input() b=[int(i) for i in input().split()] print(statistics.mode(b))