#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k = 0;
  cin >> n;
  int r[n];
  for (int i = 0; i < n; ++i) {
    cin >> r[i];
    if (r[i] % 2 == 1) ++k;
  }
  if (k % 2 == 0)
    cout << n - k;
  else
    cout << k;
}
