#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) m= [] m.append(types.count(1)) m.append(types.count(2)) m.append(types.count(3)) m.append(types.count(4)) m.append(types.count(5)) #print(m) #print(max(m)) for i in range(5): if m[i] == max(m): print(i+1) break