I=input I() x=list(map(int,I().split())) o=len([y for y in x if y&1]) print((len(x)-o&1)+(o&1))