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