#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, odd = 0, even = 0;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int sum = 0;
  for (int i = 0; i < n; i++) sum += a[i];
  if (sum % 2 == 0) {
    for (int i = 0; i < n; i++) {
      if (a[i] % 2 == 0) even++;
    }
    cout << even << '\n';
  } else if (sum % 2 == 1) {
    for (int i = 0; i < n; i++) {
      if (a[i] % 2 == 1) odd++;
    }
    cout << odd << '\n';
  }
  return 0;
}
