n = int(input()) x = sorted(list(map(int, input().split()))) while True: if not x: break ok = False for i in range(1, len(x)): if x[i] - x[i - 1] % 2: x.pop(i) x.pop(i - 1) ok = True break if not ok: break print(len(x))