#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) c1=0;c2=0;c3=0;c4=0;c5=0 for i in range(0,n): if types[i]==1: c1+=1 elif types[i]==2: c2+=1 elif types[i]==3: c3+=1 elif types[i]==4: c4+=1 else: c5+=1 if c1>=c2 and c1>=c3 and c1>=c4 and c1>=c5: print 1 elif c2>=c1 and c2>=c3 and c2>=c4 and c2>=c5: print 2 elif c3>=c1 and c3>=c2 and c3>=c4 and c3>=c5: print 3 elif c4>=c1 and c4>=c2 and c4>=c3 and c4>=c5: print 4 else: print 5 # your code goes here