#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j;
  cin >> n;
  int a[101];
  int sum = 0;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    sum = sum + a[i];
  }
  int m = 0;
  for (i = 0; i < n; i++) {
    int x;
    x = sum - a[i];
    if (x % 2 == 0) {
      m++;
    } else {
      continue;
    }
  }
  cout << m << endl;
  return 0;
}
