#!/bin/python import sys n = int(raw_input().strip()) birds = map(int, raw_input().strip().split(' ')) count = {1: 0, 2: 0, 3: 0, 4: 0, 5: 0} for bird in birds: count[bird] += 1 m = -1 ans = None for i in xrange(1, 6): if count[i] > m: ans = i m = count[i] print ans # your code goes here