N = int(input()) x = map(int, input().split()) odd = 0 for xi in x: odd += (xi%2) print(abs(2*odd - N))