#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) # your code goes here listo = [0,0,0,0,0] for i in range(len(types)): listo[types[i]-1]+= 1 tracker = listo[0] max_type = 1 for i in range(1,5): if listo[i] > tracker: tracker = listo[i] max_type = i+1 print max_type