#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) # your code goes here count = {i+1:0 for i in range(5)} for num in types: for key in count: if num == key: count[key] += 1 print max(count, key=count.get)