#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int t;
  cin >> t;
  vector<int> v(t);
  int sum = 0;
  int counter = 0;
  for (int i = 0; i < t; i++) cin >> v[i], sum += v[i];
  for (int i = 0; i < t; i++) {
    if ((sum - v[i]) % 2 == 0) counter++;
  }
  cout << counter << endl;
}
