N = int(input()) L = list(map(int, input().split())) T = 0 for x in L: if abs(x) % 2 == 0: T += 1 else: T -= 1 print(abs(T))