#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int total = 0, read;
    vector<int> v(n);
    for (int i = 0; i < n; i++) cin >> v[i];
    total = accumulate(v.begin(), v.end(), 0);
    int res = 0;
    for (int i = 0; i < n; i++)
      if ((total - v[i]) % 2 == 0) res++;
    cout << res << endl;
  }
  return 0;
}
