#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, a;
  cin >> n;
  long long int odd = 0, even = 0, sum = 0;
  for (long long int i = 0; i < n; i++) {
    cin >> a;
    if (a & 1)
      odd++;
    else
      even++;
    sum += a;
  }
  if (sum & 1)
    cout << odd;
  else
    cout << even;
  return 0;
}
