#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here freq = [0]*5 for t in types: freq[t-1] += 1 print(freq.index(max(freq))+1)