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