N = int(input().strip()) X = [int(i) for i in input().strip().split(' ') if int(i) % 2 == 0] print(abs(N - len(X) * 2))