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