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