#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  int n, a, tot, m[101] = {0}, ss;
  set<int> s;
  cin >> n;
  while (n--) {
    cin >> a;
    m[a] += 1;
    tot += a;
    s.insert(a);
  }
  a = 0;
  while (s.begin() != s.end()) {
    ss = *s.begin();
    if (tot % 2 == 0) {
      if (ss % 2 == 0) {
        a += m[ss];
      }
    }
    if (tot % 2 != 0) {
      if (ss % 2 != 0) {
        a += m[ss];
      }
    }
    s.erase(s.begin());
  }
  cout << a;
  return 0;
}
