from collections import Counter import math n = int(input()) xx = Counter(map(int,input().split())) print(max(math.ceil(len(xx)/2), max(xx.values())))