#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  int sum = 0;
  cin >> n;
  int array[n];
  for (int i = 0; i < n; ++i) {
    cin >> array[i];
    sum += array[i];
  }
  int answer = 0;
  for (int i = 0; i < n; ++i) {
    if ((sum - array[i]) % 2 == 0) answer++;
  }
  cout << answer << endl;
  return 0;
}
