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