#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) # your code goes here total = [0, 0, 0, 0, 0] for i in range(n): if types[i] == 1: total[0] += 1 elif types[i] == 2: total[1] += 1 elif types[i] == 3: total[2] += 1 elif types[i] == 4: total[3] += 1 elif types[i] == 5: total[4] += 1 #print total #print max(total) print (total.index(max(total)) + 1)