N = int(input()) L = [int(x) for x in input().split()] L_set = set(L) max_l = 0 max_cnt = 0 for i in L_set: if L.count(i) >= max_cnt and max_l