n = int(input()) types = [0]*5 for bird in [int(i) for i in input().strip().split(' ')] : types[bird-1] = types[bird-1]+1 print(1+types.index(max(types)))