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