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