#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, n, sol, sum, num;
  while (cin >> n) {
    sum = 0;
    vector<int> lis;
    for (i = 0; i < n; i++) {
      cin >> num;
      sum += num;
      lis.push_back(num);
    }
    sol = 0;
    for (i = 0; i < lis.size(); i++) {
      if ((sum - lis[i]) % 2 == 0) sol++;
    }
    cout << sol << "\n";
  }
}
