#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) freq = [-1,0,0,0,0,0] max = 0 for aType in types: freq[aType] += 1 for i in range(6): if freq[i]>freq[max]: max=i print(max)