#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) count = [0]*5 for i in types: count[i-1] +=1 #for i in range(5): # if(count[i]>max): # max=i+1 print(count.index(max(count))+1)