#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int count1 = 0;
  for (int i = 0; i < n; i++) {
    int sum = 0;
    for (int j = 0; j < n; j++) {
      if (i == j) {
        continue;
      } else {
        sum += a[j];
      }
    }
    if (sum % 2 == 0) {
      count1++;
    }
  }
  cout << count1 << endl;
  return 0;
}
