#include <bits/stdc++.h>
using namespace std;
void fast();
int main() {
  fast();
  int n, cookies[105] = {0};
  cin >> n;
  int sum = 0;
  for (int i = 0; i < n; ++i) {
    cin >> cookies[i];
    sum += cookies[i];
  }
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    int cook = sum;
    cook -= cookies[i];
    if (cook % 2 == 0) ++cnt;
  }
  cout << cnt;
  return 0;
}
void fast() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
