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