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