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