#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) l=[0,0,0,0,0] for bird in types: l[bird-1] = l[bird-1] + 1 max=0 for i in range(len(l)): if l[i] > max : max = l[i] mark = i print(mark+1)