#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) # your code goes here count=[0,0,0,0,0] for i in range(0,n): if(types[i]==1): count[0]=count[0]+1 elif(types[i]==2): count[1]=count[1]+1 elif(types[i]==3): count[2]=count[2]+1 elif(types[i]==4): count[3]=count[3]+1 elif(types[i]==5): count[4]=count[4]+1 max=count[0] pos=0 for i in range(0,5): if(count[i]>max): max=count[i] pos=i print pos+1