#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here counts = [0] * 5 for bird in types: counts[bird-1] += 1 max_count = 0 max_type = 0 for t, num in enumerate(counts): if num > max_count: max_count = num max_type = t print(max_type + 1)