#!/bin/python3 import sys n = int(input().strip()) numbers = input().split(' ') birds = [0,0,0,0,0] for i in numbers: if(i=='1'): birds[0]+=1 if(i=='2'): birds[1]+=1 if(i=='3'): birds[2]+=1 if(i=='4'): birds[3]+=1 if(i=='5'): birds[4]+=1 print(birds.index(max(birds))+1)