#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here first = 0 second = 0 third = 0 fourth = 0 fifth = 0 for bird in types: if bird == 1: first = first + 1 if bird == 2: second = second + 1 if bird == 3: third = third + 1 if bird == 4: fourth = fourth + 1 if bird == 5: fifth = fifth + 1 which = 1 great = 0 if fifth >= great: which = 5 great = fifth if fourth >= great: which = 4 great = fourth if third >= great: which = 3 great = third if second >= great: which = 2 great = second if first >= great: great = first which = 1 print(which)