#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> even_bag, odd_bag;
  int n, all, x;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    all += x;
    if (x & 1)
      odd_bag.push_back(x);
    else
      even_bag.push_back(x);
  }
  cout << ((all & 1) ? odd_bag.size() : even_bag.size()) << endl;
  return 0;
}
