#include <bits/stdc++.h>
using namespace std;
void online() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
int main() {
  online();
  int n;
  cin >> n;
  int counto = 0, counte = 0;
  for (int i = 0; i < n; i++) {
    int c;
    cin >> c;
    if (c % 2 != 0)
      counto++;
    else
      counte++;
  }
  int ans = 0;
  counto % 2 == 1 ? ans = counto : ans = counte;
  cout << ans;
}
