#include <bits/stdc++.h>
using namespace std;
string en = "\n";
string sp = " ";
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  long long int odd = 0;
  long long int even = 0;
  vector<long long int> arr(n);
  for (long long int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] % 2 == 0)
      even++;
    else
      odd++;
  }
  if (odd % 2)
    cout << odd << endl;
  else
    cout << even << endl;
}
