#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, sum = 0, x, c = 0;
  cin >> n;
  vector<int> v;
  for (i = 1; i <= n; i++) {
    int a;
    cin >> a;
    sum = sum + a;
    v.push_back(a);
  }
  x = sum;
  for (i = 0; i < v.size(); i++) {
    x = x - v[i];
    if (x % 2 == 0) c++;
    x = sum;
  }
  cout << c << endl;
  return 0;
}
