#include <bits/stdc++.h>
using namespace std;
void myassert(bool expr) {
  if (!expr) abort();
}
const int64_t posinf = 9223372036854775807LL;
const int64_t neginf = 9223372036854775808LL;
const int64_t bigprime = (1LL << 61) - 1LL;
const int64_t mult = 199;
const int64_t mult2 = 3571;
const int64_t mod = 1000000007LL;
const int64_t mod2 = 1000000009LL;
const long double pi = 3.1415926535897932384626433832795L;
template <typename T>
T gcd(T a, T b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> nums(n);
  int sum = 0;
  for (int &i : nums) {
    cin >> i;
    sum += i;
  }
  int ans = 0;
  for (int &i : nums) {
    if ((sum - i) % 2 == 0) ans++;
  }
  cout << ans;
  return 0;
}
