#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, a;
  cin >> n;
  int sum = 0, cnt_even = 0, cnt_odd = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a;
    sum += a;
    if (a % 2 == 0)
      ++cnt_even;
    else
      ++cnt_odd;
  }
  int ans = 0;
  if (sum % 2 == 0)
    ans = cnt_even;
  else
    ans = cnt_odd;
  cout << ans;
  return 0;
}
