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