#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here c1 = types.count(1) c2 = types.count(2) c3 = types.count(3) c4 = types.count(4) c5 = types.count(5) counts = [c1,c2,c3,c4,c5] print(counts.index(max(counts))+1)