#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) # your code goes here type_dict= {1:0, 2:0, 3:0, 4:0, 5:0} for entry in types: type_dict[int(entry)] += 1 print max(type_dict, key=type_dict.get)