#include <bits/stdc++.h>
using namespace std;
int main() {
  int arr[100], n, temp = 0, res = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    temp += arr[i];
  }
  for (int i = 0; i < n; i++) {
    if (!((temp - arr[i]) % 2)) res++;
  }
  cout << res << endl;
}
