#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s;
  int a[128];
  scanf("%d", &n);
  s = 0;
  for (int i = 0; i < n; ++i) {
    scanf("%d", a + i);
    s += a[i];
  }
  int ans = 0;
  for (int i = 0; i < n; ++i)
    if ((s - a[i]) % 2 == 0) ++ans;
  printf("%d\n", ans);
  return 0;
}
