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