#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  cin >> n;
  int ones = 0, evens = 0;
  for (int i = 0; i < n; i++) {
    cin >> t;
    if (t % 2 == 0)
      evens++;
    else
      ones++;
  }
  if (ones % 2 == 0) {
    cout << evens;
  } else
    cout << ones;
}
