#include <bits/stdc++.h>
using namespace std;
bool pred(int a) { return a % 2 == 0; }
int main() {
  int n;
  cin >> n;
  vector<int> vec(n);
  for (int i = 0; i < n; ++i) cin >> vec[i];
  if (accumulate(vec.begin(), vec.end(), 0) % 2 == 0)
    cout << count_if(vec.begin(), vec.end(), pred);
  else
    cout << n - count_if(vec.begin(), vec.end(), pred);
  cout << "\n";
}
