#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using pii = pair<int, int>;
void _print() { cout << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  cout << t;
  if (sizeof...(v)) cout << ", ";
  _print(v...);
}
const int mod = 1000000007;
void io_set() {}
void solve() {
  int n;
  cin >> n;
  int o = 0, s = 0;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x & 1) o++;
    s += x;
  }
  int e = n - o;
  if (s & 1)
    cout << o << '\n';
  else
    cout << e << '\n';
}
signed main(int argc, char **argv) {
  io_set();
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int tt = 1;
  while (tt--) {
    solve();
  }
  return 0;
}
