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