#include <bits/stdc++.h>
using namespace std;
long long mx = 1e9 + 7;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, s = 0, e = 0, o = 0, t;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> t;
    s += t;
    if (t % 2)
      o++;
    else
      e++;
  }
  if (s % 2 == 0)
    cout << e << "\n";
  else
    cout << o << "\n";
  return 0;
}
