#include <bits/stdc++.h>
int main() {
  int n, i, a = 0, b = 0, c = 0, x;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &x);
    if (x % 2 == 1)
      a++;
    else
      b++;
    c += x;
  }
  if (c % 2 == 0)
    printf("%d\n", b);
  else
    printf("%d\n", a);
}
