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