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