#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, resp = 0, acc = 0;
  cin >> n;
  vector<int> vec(n);
  for (int &x : vec) cin >> x, acc += x;
  for (auto ele : vec)
    if ((acc - ele) % 2 == 0) resp++;
  cout << resp;
  return 0;
}
