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