print abs(input()-sum(2 for i in map(int,raw_input().split())if i&1))