#!/bin/python3

import sys


n = int(input().strip())
types = list(map(int, input().strip().split(' ')))
# your code goes here
counts = [0]*5
for i in range(0, n):
    counts[types[i]-1] += 1

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