N = int(input()) L = input() count = [0]*7 rate = 0 for i in range(1,7): count[i] = L.count(str(i)) if rate <= count[i]: rate = i print(rate)