#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) # your code goes here freqs = [0, 0, 0, 0, 0] for bird in types: freqs[bird-1] += 1 max_freq = freqs[0] max_type = 1 for i, freq in enumerate(freqs): if freq > max_freq: max_type = i +1 max_freq = freq print max_type