#!/usr/bin/python # -*- coding: utf-8 -*- N = int(raw_input()) arr = map(int, raw_input().split()) set_arr = sorted(set(arr)) max,max_num = 0 , 0 for i in set_arr: if max <= arr.count(i): max_num = i max = arr.count(i) print max_num