#include <bits/stdc++.h>
using namespace std;
int main() {
  int odd = 0, even = 0, n, a, sum = 0;
  cin >> n;
  while (n--) cin >> a, a % 2 == 0 ? even++ : odd++, sum += a;
  return (cout << (sum % 2 == 0 ? even : odd) << endl) && 0;
}
