#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) # your code goes here countArray = [0,0,0,0,0] for type in types: countArray[type-1] = countArray[type-1] + 1 print countArray.index(max(countArray)) + 1