#!/bin/python3 import sys def getSizeOfFlock(): n = int(input().strip()) return n def getTypes(): types = list(map(int, input().strip().split(' '))) return types def __main__(): n= getSizeOfFlock() arr=getTypes() comArr=[0]*6 h=0 while h<=len(arr)-1: comArr[arr[h]]=comArr[arr[h]]+1 h=h+1 maxx=0 index=-1 k=0 while k<=len(comArr)-1: if comArr[k]>maxx: maxx=comArr[k] index=k k=k+1 print(index) __main__()