#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, counter = 0;
  cin >> t;
  int n[t], m = 0;
  for (int i = 0; i < t; i++) cin >> n[i];
  for (int j = 0; j < t; j++) m += n[j];
  for (int o = 0; o < t; o++) {
    m = m - n[o];
    if (m % 2 == 0) counter++;
    m = m + n[o];
  }
  cout << counter << endl;
  return 0;
}
