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