#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) counts = [0, 0, 0, 0, 0] for i in types: counts[i - 1] += 1 j = 0 n, m = 0, 0 while j < 5: if counts[j] > m: m = counts[j] n = j + 1 j += 1 print(n)