#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int a[100000], cnt = 0, sum = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    cnt += a[i];
  }
  for (int i = 0; i < n; i++) {
    if ((cnt - a[i]) % 2 == 0) sum++;
  }
  printf("%d\n", sum);
  return 0;
}
