#include <bits/stdc++.h>
using namespace std;
int n;
bool check(int arr[], int x) {
  int sum = 0;
  for (int i = 0; i < n; i++) {
    if (i != x) sum += arr[i];
  }
  if (sum % 2 == 0) return true;
  return false;
}
int main() {
  cin >> n;
  int arr[100] = {0};
  for (int i = 0; i < n; i++) cin >> arr[i];
  int counter = 0;
  for (int i = 0; i < n; i++)
    if (check(arr, i)) counter++;
  cout << counter << "\n";
  return 0;
}
