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