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