#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) t1 = types.count(1) t2 = types.count(2) t3 = types.count(3) t4 = types.count(4) t5 = types.count(5) maxtype = max(t1, t2, t3, t4, t5) if t1 == maxtype: print('1') elif t2 == maxtype: print('2') elif t3 == maxtype: print('3') elif t4 == maxtype: print('4') else: print('5')