#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, ch = 0, nch = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> m;
    if (m % 2 == 0)
      ch++;
    else
      nch++;
  }
  if (nch % 2 == 0)
    cout << ch;
  else
    cout << nch;
  return 0;
}
