#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) # your code goes here counter = [0,0,0,0,0] for i in range(0,n): for j in range(0,5): if(types[i]==j+1): counter[j] += 1 a = max(counter) for j in range(0,5): if(counter[j]==a): print j+1 break