#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<int> a;
  long long all = 0;
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    all += t;
    a.push_back(t);
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if ((all - a[i]) % 2 == 0) {
      ans++;
    }
  }
  cout << ans << endl;
}
