#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, e, sum = 0, x = 0, y = 0, i;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> e;
    if (e % 2 == 0)
      x++;
    else
      y++;
    sum += e;
  }
  if (sum % 2 == 0)
    cout << x;
  else
    cout << y;
}
