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