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