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