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