#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) # your code goes here type_count = [0, 0, 0, 0, 0] for i in range(0, n): num = types[i] if num == 1: type_count[0] += 1 if num == 2: type_count[1] += 1 if num == 3: type_count[2] += 1 if num == 4: type_count[3] += 1 if num == 5: type_count[4] += 1 max_num = type_count[0] max_type = 0 for i in range(0,5): if type_count[i] > max_num: max_num = type_count[i] max_type = i print max_type+1