#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) # your code goes here type_counts = [0,0,0,0,0] for t in types: type_counts[t-1] += 1 print type_counts.index(max(type_counts)) + 1