#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) c1=0 c2=0 c3=0 c4=0 c5=0 for i in range (n): if types[i]==1: c1=c1+1 if types[i]==2: c2=c2+1 if types[i]==3: c3=c3+1 if types[i]==4: c4=c4+1 if types[i]==5: c5=c5+1 arr=[c1,c2,c3,c4,c5] print ((arr.index(max(arr)))+1)