#include <bits/stdc++.h>
int main() {
  int n;
  int odd = 0, even = 0, a;
  scanf("%d", &n);
  while (n--) {
    scanf("%d", &a);
    even += (a % 2 == 0);
    odd += (a & 1);
  }
  if (odd & 1) {
    printf("%d\n", odd);
  } else {
    printf("%d\n", even);
  }
  return 0;
}
