#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) a = [types.count(x) for x in range(1,6)] b = max(a) for k in range(0,5): if a[k] == b: print(k+1) break