#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) # your code goes here a = [0] * 6 for t in types: a[t] += 1 l = 0 for i in range(6): if a[i] > a[l]: l = i print l