#include <bits/stdc++.h>
int main() {
  int n, s = 0, i, j = 0, y;
  scanf("%d", &n);
  int x[n];
  for (i = 0; i < n; i = i + 1) {
    scanf("%d", &x[i]);
    s = s + x[i];
  };
  for (i = 0; i < n; i = i + 1) {
    y = s;
    y = y - x[i];
    if ((y % 2) == 0) {
      j = j + 1;
    }
  }
  printf("%d", j);
}
