#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int n, s[N], a, b;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    if (s[i] % 2)
      b++;
    else
      a++;
  }
  if (b % 2 != 0)
    cout << b << endl;
  else
    cout << a << endl;
}
