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