#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, s = 0, o = 0, e = 0;
  cin >> n;
  long long arr[n];
  for (int i = 0; i < n && cin >> arr[i]; i++) {
    s += arr[i];
    if (arr[i] % 2 == 0)
      e++;
    else
      o++;
  }
  if (s % 2 == 0)
    cout << e;
  else
    cout << o;
}
