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