#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) n1=types.count(1) n2=types.count(2) n3=types.count(3) n4=types.count(4) n5=types.count(5) x=max(n1,n2,n3,n4,n5) if x==n1: print(1) elif x==n2: print(2) elif x==n3: print(3) elif x==n4: print(4) elif x==n5: print(5) # your code goes here