#include <bits/stdc++.h>
using namespace std;
int main() {
  int numCookies;
  cin >> numCookies;
  int sum = 0;
  int cookies[numCookies];
  for (int i = 0; i < numCookies; i++) {
    int num;
    cin >> num;
    sum += num;
    cookies[i] = num;
  }
  int ways = 0;
  for (int i = 0; i < numCookies; i++) {
    if ((sum - cookies[i]) % 2 == 0) {
      ways++;
    }
  }
  cout << ways;
  return 0;
}
