#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here amt=[0,0,0,0,0] i=0 while i < n: if types[i] is 1: amt[0]=amt[0]+1 if types[i] is 2: amt[1]=amt[1]+1 if types[i] is 3: amt[2]=amt[2]+1 if types[i] is 4: amt[3]=amt[3]+1 if types[i] is 5: amt[4]=amt[4]+1 i=i+1 print(str(amt.index(max(amt))+1))