#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) # your code goes here v = [types.count(i) for i in range(1,6)] print v.index(max(v))+1