#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here xlist={} for x in range(1,6): xlist[x]=0 for x in types: xlist[x]+=1 max = 1 maxval = 0 for x in range(1,6): if (xlist[x])>maxval: maxval = xlist[x] max=x print(max)