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