#!/bin/python3 import sys from collections import Counter n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here x=(Counter(types)) x=x.most_common(1) print(x[0][0])