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