#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here num1 = 0; num2 = 0; num3 = 0; num4 = 0; num5 = 0; for j in types: if (j == 1): num1 += 1; elif (j == 2): num2 += 1; elif (j == 3): num3 += 1; elif (j == 4): num4 += 1; else: num5 += 1; maximum = max(num1, num2, num3, num4, num5); counter = 1 for i in [num1,num2,num3,num4,num5]: if (i == maximum): print (counter); break; else: counter += 1;