#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here count={1: 0, 2:0, 3:0, 4:0, 5:0} for bird in types: if int(bird)==1: count[1]=+1 if int(bird)==2: count[2]+=1 if int(bird)==3: count[3]+=1 if int(bird)==4: count[4]+=1 if int(bird)==5: count[5]+=1 mostcommon= max(count, key=count.get) print(mostcommon)