n = int(input()) x = list(map(int, input().split())) x = sorted(x) def f(n, x): sum = 0 count = 0 for i in range(n): for j in range(n): if not x[j] == 'done' and not x[i] == 'done': if not abs(x[i] - x[j]) % 2 == 0: x[i] = 'done' x[j] = 'done' for i in x: if type(i) == int: count += 1 return count print(f(n, x))