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