#include <bits/stdc++.h>
using namespace std;
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  int sum(0), even(0), odd(0);
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x % 2 == 0)
      even += 1;
    else
      odd += 1;
  }
  cout << (odd % 2 == 1 ? odd : even) << "\n";
  return 0;
}
