#include <bits/stdc++.h>
using namespace std;
int n, sum, ans;
int a[101];
int main() {
  cin >> n;
  ans = sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  for (int i = 0; i < n; i++) {
    if ((sum - a[i]) % 2 == 0) ans++;
  }
  cout << ans << endl;
  return 0;
}
