#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) # your code goes here nums = [0, 0, 0, 0, 0] i = 0 def typesort(x): return { "1": 0, "2": 1, "3": 2, "4": 3, "5": 4, }[x] while i < n: type = str(types[i]) nums[typesort(type)] += 1 i += 1 print nums.index(max(nums))+1