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