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