#include <bits/stdc++.h>
int main() {
  int x[105], i, y, z, c, sum = 0, flag = 0;
  scanf("%d", &y);
  for (i = 0; i < y; i++) {
    scanf("%d", &x[i]);
    sum = sum + x[i];
  }
  z = sum;
  for (c = i - 1; c >= 0; c--) {
    z = z - x[c];
    if (z % 2 == 0) {
      flag++;
    }
    z = sum;
  }
  printf("%d\n", flag);
}
