#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here bird_list = [0,0,0,0,0] for x in (types): bird_list[x-1] += 1 print(bird_list.index(max(bird_list)) + 1)