#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here typecount = { 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, } for bird in types: typecount[bird] += 1 keymax = 1 for key in typecount: if typecount[key] > typecount[keymax]: keymax = key print(keymax)