#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) count = [0]*5 for num in types: count[num-1]=count[num-1]+1 max = -1 index = -1 for i in range(len(count)): if count[i]>max: max = count[i] index = i print(index+1)