#!/bin/python

import sys


n = int(raw_input().strip())
types = map(int, raw_input().strip().split(' '))
# your code goes here
typefreq = [0,0,0,0,0]
for bird in types:
    if bird == 1:
        typefreq[0] += 1
    elif bird == 2:
        typefreq[1] += 1
    elif bird == 3:
        typefreq[2] += 1
    elif bird == 4:
        typefreq[3] += 1
    elif bird == 5:
        typefreq[4] += 1

print typefreq.index(max(typefreq))+1