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