n = int(input()) a = list(map(int, input().split())) from collections import Counter count = Counter(a) max_count = max(count.values()) other = (n + 1) // 2 print(max(max_count, other))