#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) # your code goes here totals = [0, 0, 0, 0, 0] for x in range(0, n): for i in range(1, 6): if types[x] == i: totals[i-1] += 1 print totals.index(max(totals)) + 1