#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, odd = 0, even = 0;
  cin >> n;
  while (n--) {
    cin >> a;
    if (a % 2 == 0) {
      even += 1;
    } else {
      odd += 1;
    }
  }
  cout << (odd % 2 == 1 ? odd : even) << endl;
  return 0;
}
