#include <bits/stdc++.h>
const long double eps = 1e-9;
const double pi = acos(-1.0);
const long long inf = 1e18;
using namespace std;
int nod(int a, int b) {
  if (a != 0)
    return nod(b % a, a);
  else
    return b;
}
double sqr(double x) { return x * x; }
int h = 0, p[200];
char ss[2222222], s[2222222], ans[2222222];
int main(int argc, const char* argv[]) {
  int n, ans = 0, res = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i];
    res += p[i];
  }
  for (int i = 0; i < n; i++)
    if ((p[i] % 2) == (res % 2)) ++ans;
  cout << ans;
  return 0;
}
