#!/bin/python3 n = int(input().strip()) types = list(map(int, input().strip().split(' '))) occur = [0, 0, 0, 0, 0] for t in types: occur[t - 1] += 1 print(occur.index(max(occur)) + 1)