#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, i, p, s = 0, c = 0;
  cin >> n;
  int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    s += a[i];
  }
  for (i = 0; i < n; i++) {
    p = (s - a[i]);
    if (p % 2 == 0) {
      c++;
    }
  }
  cout << c;
  return 0;
}
