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