#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, even = 0, odd = 0, sum = 0;
  cin >> n;
  long long a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 0) {
      even++;
    } else {
      odd++;
    }
  }
  sum = accumulate(a, a + n, 0);
  if (sum % 2 == 0) {
    cout << even;
  } else {
    cout << odd;
  }
}
