#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, even = 0, odd = 0, sum = 0;
  scanf("%d", &n);
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    sum += arr[i];
    if (arr[i] % 2) {
      odd++;
    } else {
      even++;
    }
  }
  if (sum % 2) {
    cout << odd;
  } else {
    cout << even;
  }
  return 0;
}
