#include <bits/stdc++.h>
using namespace std;
template <class T>
string toStr(const T &x) {
  stringstream s;
  s << x;
  return s.str();
}
template <class T>
int toInt(const T &x) {
  stringstream s;
  s << x;
  int r;
  s >> r;
  return r;
}
const int MAXN = 10e5 + 5;
int main() {
  int n, sum = 0, ans = 0;
  vector<int> bags;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int t;
    cin >> t;
    bags.push_back(t);
    sum += t;
  }
  for (int i = 0; i < n; ++i) {
    int act = sum - bags[i];
    if (act % 2 == 0) ans++;
  }
  cout << ans << endl;
  return 0;
}
