#include <bits/stdc++.h>
using namespace std;
vector<int> G[100009];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0);
  int n;
  cin >> n;
  int a[n], sum = 0;
  for (int i = 0; i < n; i++) cin >> a[i], sum += a[i];
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if ((sum - a[i]) % 2 == 0) cnt++;
  }
  cout << cnt << endl;
  return 0;
}
