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