#include <bits/stdc++.h>
using namespace std;
int n, m, ans, i, a, ma = -1;
map<int, int> mp;
int main() {
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> m;
    if (m % 2 != 0) {
      a++;
    } else
      ans++;
  }
  if (a % 2 == 0) {
    cout << ans;
  } else {
    cout << a;
  }
  return 0;
}
