#!/bin/python import sys n = long(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) # your code goes here a = [0,0,0,0,0] for i in types: a[i-1]+=1 print a.index(max(a))+1