#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here compare = [[],[],[],[],[]] maxLen = 0 mode = 0 for i in range(n): if types[i] == 1: compare[0].append(types[i]) elif types[i] ==2: compare[1].append(types[i]) elif types[i] ==3: compare[2].append(types[i]) elif types[i] ==4: compare[3].append(types[i]) elif types[i] == 5: compare[4].append(types[i]) for x in range(5): if len(compare[x])>maxLen: maxLen = len(compare[x]) mode = (x + 1) print(mode)