#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[1000];
  int sum = 0;
  int count = 0, count1 = 0;
  int index = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
    if (a[i] % 2 == 0)
      count++;
    else {
      index = i;
      count1++;
    }
  }
  if (count == 1) {
    cout << 1 << endl;
    return 0;
  }
  if (sum % 2 != 0) {
    if (count == 0 && count > 2) {
      cout << 0 << endl;
      return 0;
    }
    cout << count1 << endl;
    return 0;
  }
  if (sum % 2 == 0) {
    cout << count << endl;
    return 0;
  }
}
