#!/bin/python #import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) gist=5*[0] for t in types: gist[t-1]+=1 print gist.index(max(gist))+1