#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i, j, even = 0, odd = 0;
  cin >> n;
  vector<long long int> v(n);
  long long int sum = 0;
  for (i = 0; i < n; i++) {
    cin >> v[i];
    if (v[i] % 2 == 0) {
      even++;
    } else {
      odd++;
    }
    sum += v[i];
  }
  if (sum % 2 != 0) {
    cout << odd << endl;
  } else {
    cout << even << endl;
  }
  return 0;
}
