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