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