#!/bin/python3 import sys import collections one = 0 two = 0 three = 0 four = 0 five = 0 n = int(input().strip()) types = list(map(int, input().strip().split(' '))) for i in range (0,len(types)): if types[i] == 1: one = one + 1 elif types[i] == 2: two = two + 1 elif types[i] == 3: three = three + 1 elif types[i] == 4: four = four + 1 elif types[i] == 5: five = five + 1 freqList = [one,two,three,four,five] for i in range (0,len(freqList)): if freqList[i] == max(freqList): print(i+1) break