#include <bits/stdc++.h>
using namespace std;
int z[1001];
int main() {
  long long a, b, c, ans = 0, sum = 0, da = 0;
  cin >> a;
  int ans1 = 0;
  for (int i = 1; i <= a; ++i) {
    cin >> z[i];
    ans += z[i];
    if (z[i] % 2 == 0) {
      ans1++;
    } else {
      sum++;
    }
  }
  if (ans % 2 == 0) {
    cout << ans1;
  } else {
    cout << sum;
  }
}
