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