#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int total = 0;
  int t = 0;
  int arr[n];
  for (int i = 0; i < n; i++) {
    int temp = 0;
    cin >> temp;
    arr[i] = temp;
    total += temp;
  }
  for (int i = 0; i < n; i++) {
    if ((total - arr[i]) % 2 == 0) {
      t++;
    }
  }
  cout << t;
  return 0;
}
