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