#include <bits/stdc++.h>
using namespace std;
long int a, b, i, mas[101], kol, sum, t;
int main() {
  cin >> a;
  sum = 0;
  for (i = 1; i <= a; ++i) {
    cin >> b;
    sum = sum + b;
    mas[i] = b;
  }
  kol = 0;
  for (i = 1; i <= a; ++i) {
    t = sum - mas[i];
    if (t % 2 == 0) {
      kol = kol + 1;
    }
  }
  cout << kol;
  return 0;
}
