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