#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int par = 0, impar = 0;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (a % 2 == 0)
      par++;
    else
      impar++;
  }
  if (impar % 2 != 0)
    cout << impar << "\n";
  else if (impar % 2 == 0)
    cout << par << "\n";
  return 0;
}
