#include <bits/stdc++.h>
using namespace std;
int s[10001];
int main() {
  int a, ans = 0, sum = 0, lol = 0;
  cin >> a;
  for (int i = 0; i < a; ++i) {
    cin >> s[i];
    ans = ans + s[i];
    if (s[i] % 2 == 0) {
      sum++;
    } else {
      lol++;
    }
  }
  if (ans % 2 == 0) {
    cout << sum;
  } else {
    cout << lol;
  }
}
