#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) count = [0,0,0,0,0] for i in types: count[i-1] += 1 aType = 0 theType = 0 for i in count: if count[aType] > count[theType]: theType = aType aType += 1 print(theType + 1)