#include <bits/stdc++.h>
using namespace std;
class PNC {
 public:
  vector<unsigned long long int> f;
  long long int m;
  PNC(long long int n, long long int m = 998244353) {
    f.resize(n + 1);
    this->m = m;
    f[0] = 1;
    for (int i = 1; i <= n; i++) {
      f[i] = (i * f[i - 1]) % m;
    }
  }
  long long int power(long long int b, long long int p,
                      long long int m = 998244353) {
    long long int res = 1;
    while (p > 0) {
      if (p & 1) res = ((res % m) * (b % m)) % m;
      b = ((b % m) * (b % m)) % m;
      p = p >> 1;
    }
    return res;
  }
  long long int modInverse(long long int n, long long int m = 998244353) {
    return power(n, m - 2, m);
  }
  long long int factorial(long long int n) { return f[n]; }
  long long int nCr(long long int n, long long int r) {
    if (r == 0) return 1;
    return (f[n] * modInverse(f[r], m) % m * modInverse(f[n - r], m) % m) % m;
  }
  long long int nPr(long long int n, long long int r) {
    if (r == 0) return 1;
    return (f[n] * modInverse(f[n - r], m) % m) % m;
  }
};
int main() {
  long long n, sum = 0;
  cin >> n;
  vector<long long> vec(n);
  for (long long i = 0; i < n; i++) {
    cin >> vec[i];
    sum += vec[i];
  }
  long long count = 0;
  for (auto it : vec) {
    if ((sum - it) % 2 == 0) count++;
  }
  cout << count << endl;
}
