#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here A = [0 for _ in range(5)] for item in types: A[item-1] += 1 maxNum = 0 index = None for i in range(5): if A[i] > maxNum: maxNum = A[i] index = i+1 print(index)