#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  int sum = 0;
  int odd = 0, even = 0;
  for (int i = 0; i < t; i++) {
    int p;
    cin >> p;
    sum += p;
    if (p % 2 == 0)
      even++;
    else
      odd++;
  }
  if (sum % 2 == 0)
    cout << even << endl;
  else
    cout << odd << endl;
  return 0;
}
