#include <bits/stdc++.h>
using namespace std;
inline char GC() {
  char k;
  while ((k = getchar()) == ' ' || k == '\n' || k == '\t' || k == '\v' ||
         k == '\0') {
  };
  return k;
}
template <typename t>
inline t getnum() {
  t res = 0;
  char c = GC();
  int sign = 1;
  if (c == '+') {
  } else if (c == '-')
    sign = -1;
  else
    res = c - '0';
  while ((c = getchar()) >= '0' && c <= '9') {
    res = res * 10 + c - '0';
  }
  return res * sign;
}
inline string getstr() {
  string str;
  char k;
  while ((k = GC()) != ' ' && k != '\n' && k != '\t' && k != '\v' &&
         k != '\0' && k != EOF)
    str.push_back(k);
  return str;
}
inline void _open() { freopen("a.in", "r", stdin); }
int main() {
  int fool = getnum<int>(), fuck = 0, shit[2];
  memset(shit, 0, sizeof shit);
  for (int i = 0; i < fool; i++) shit[getnum<int>() % 2]++;
  if (shit[1] % 2)
    printf("%d", shit[1]);
  else
    printf("%d", shit[0]);
  return 0;
}
