#!/bin/python3 import sys n = int(input().strip()) types = list(input().strip().split(' ')) # your code goes here occ = [types.count("1")] occ += [types.count("2")] occ += [types.count("3")] occ += [types.count("4")] occ += [types.count("5")] print (occ.index(max(occ))+1)