#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) max_count=0 max_type =0 for ty in range(1,6): if types.count(ty)>max_count: max_type = ty max_count = types.count(ty) print max_type