input() n = [0,0] for x in map(int,raw_input().split()): n[x%2] += 1 print (n[0]%2)+(n[1]%2)