#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here counts =[0,0,0,0,0,0] max_total = 0 max_type = 0 for i in range(0,len(counts)): counts[i]=len([x for x in types if x==i]) if counts[i]>max_total: max_total = counts[i] max_index = i print(max_index)