import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) num = [] max = 0 j = 0 for i in range(5): a = types.count(i+1) if(max < a): max = a j = i+1 print(j)