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