#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n;
  cin >> n;
  int a[n];
  int sum = 0, ans = 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)) ans++;
  cout << ans << endl;
  return 0;
}
