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