#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) # your code goes here all_birds = {} all_birds['1'] = types.count(1) all_birds['2'] = types.count(2) all_birds['3'] = types.count(3) all_birds['4'] = types.count(4) all_birds['5'] = types.count(5) print max(all_birds, key=all_birds.get)