#include <bits/stdc++.h>
using namespace std;
int mod = 1000000007;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    long long n;
    cin >> n;
    long long a[n];
    long long s = 0, e = 0, o = 0;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      s += a[i];
      if (a[i] % 2 == 0)
        e++;
      else
        o++;
    }
    if (s % 2 == 0)
      cout << e << endl;
    else
      cout << o << endl;
  }
  return 0;
}
