#include <bits/stdc++.h>
using namespace std;
struct node {
  int beg, fin, num, diff;
  bool operator<(const node &p) const {
    if (num == p.num)
      return diff < p.diff;
    else
      return num > p.num;
  }
};
node ara[1000001];
int main() {
  long long n, i, j, k, m, a, c, b, p, t, l, x, y, q;
  string s, s1;
  while (cin >> n) {
    p = 0, q = 0;
    for (i = 0; i < n; i++) {
      cin >> m;
      if (m % 2 == 0)
        p++;
      else
        q++;
    }
    if (!q)
      cout << p << endl;
    else if (!p) {
      if (q % 2 == 0)
        cout << "0\n";
      else
        cout << q << endl;
    } else {
      if (q % 2 == 0)
        cout << p << endl;
      else
        cout << q << endl;
    }
  }
}
