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