#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned int n;
  cin >> n;
  vector<unsigned int> a(n, 0);
  for (int i = 0; i < n; i++) cin >> a[i];
  unsigned int result = 0;
  unsigned int sum = accumulate(a.begin(), a.end(), 0);
  for (int i = 0; i < n; i++) {
    if (((a[i] % 2 == 0) && (sum % 2 == 0)) ||
        ((a[i] % 2 != 0) && (sum % 2 != 0)))
      result++;
  }
  cout << result;
  return 0;
}
