print(abs(int(input()) - sum([x%2 for x in map(int, input().split())] * 2)))