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