#!/bin/python import sys n = int(raw_input().strip()) types = map(int, raw_input().strip().split(' ')) # your code goes here def main(n,types): one = types.count(1) two = types.count(2) three = types.count(3) four = types.count(4) five = types.count(5) arr = [one,two,three,four,five] dic = {five:5,four:4,three:3,two:2,one:1} arr = sorted(arr) if arr.count(arr[4]) == 1: print dic[arr[4]] else: for num in arr: if num == arr[4]: print dic[num] return main(n,types)