#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) arr=[] a=types.count(1) b=types.count(2) c=types.count(3) d=types.count(4) e=types.count(5) arr.append(a) arr.append(b) arr.append(c) arr.append(d) arr.append(e) print(arr.index(max(arr))+1)