#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  scanf("%d", &N);
  vector<int> V(N);
  int sum = 0;
  for (int i = 0; i < N; i++) {
    scanf("%d", &V[i]);
    sum += V[i];
  }
  int ret = 0;
  for (int i = 0; i < N; i++) {
    int tsum = sum - V[i];
    if (tsum % 2 == 0) ret += 1;
  }
  printf("%d\n", ret);
  return 0;
}
