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