#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here count= [0] * 6 for i in range(len(types)): count[types[i]] += 1 highest=-1 index=-1 for j in range(len(count)): if highest < count[j] : highest = count[j] index = j print(index)