#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here birds = [0,0,0,0,0] for i in types: birds[i-1] += 1 max = 0 pos = 0 for i in range(5): if max < birds[i]: pos = i+1 max = birds[i] print(pos)