#!/bin/python def counting(n,array): type = {'1':0,'2':0,'3':0,'4':0,'5':0} result = '' max = 0 for i in range(n): type[str(array[i])] += 1 for i in range(5): if(type[str(i+1)] > max): result = str(i+1) max = type[str(i+1)] print result import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) # your code goes here counting(n,types)