#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, x, genap = 0, ganjil = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    if (x % 2 == 0)
      genap++;
    else
      ganjil++;
  }
  if (ganjil % 2 == 1)
    cout << ganjil << endl;
  else
    cout << genap << endl;
}
