#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here c1,c2,c3,c4,c5=0,0,0,0,0 for i in types: if i==1: c1+=1 elif i==2: c2+=1 elif i==3: c3+=1 elif i==4: c4+=1 else: c5+=1 if max(c1,c2,c3,c4,c5)==c1: print("1") elif max(c1,c2,c3,c4,c5)==c2: print("2") elif max(c1,c2,c3,c4,c5)==c3: print("3") elif max(c1,c2,c3,c4,c5)==c4: print("4") else: print("5")