#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, cnt, sum;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    sum += x;
    if (x & 1) cnt++;
  }
  if (sum & 1)
    cout << cnt;
  else
    cout << n - cnt;
}
