#include <bits/stdc++.h>
using namespace std;
vector<int> a;
void insertion(int l, int h, vector<int> &s, int n) {
  if (l == h)
    s.insert(s.begin() + l, n);
  else {
    int mid = (l + h) / 2;
    if ((int)n > (int)s[mid])
      insertion(mid + 1, h, s, n);
    else
      insertion(l, mid, s, n);
  }
}
void insertElem(vector<int> &s, int n) { insertion(0, (int)s.size(), s, n); }
void f(int x) {
  if (x == 1)
    return;
  else {
    int temp;
    temp = a[x];
    a[x] = a[x - 1];
    a[x - 1] = temp;
    f(x - 1);
  }
}
int main() {
  int n, sum = 0;
  cin >> n;
  vector<int> v;
  v.resize(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    sum += v[i];
  }
  int cnt = 0;
  for (int i = 0; i < n; i++)
    if ((sum - v[i]) % 2 == 0) cnt++;
  cout << cnt;
}
