#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here dict = dict.fromkeys(range(1,6),0) for key in dict: total = types.count(key) dict[key] = total print(max(dict, key=dict.get))