#include <bits/stdc++.h>
using namespace std;
const long long int maxn = 2 * 1e5 + 1;
const long long int modn = 1e9 + 7;
void solve() {
  long long int n;
  cin >> n;
  vector<long long int> a(n);
  for (long long int i = 0; i < n; i++) cin >> a[i];
  long long int sum = 0;
  for (long long int i = 0; i < n; i++) sum += a[i];
  long long int ans = 0;
  for (auto i : a)
    if (sum % 2 == i % 2) ans++;
  cout << ans;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  long long int tc = 1;
  for (long long int i = 1; i < tc + 1; i++) {
    solve();
  }
  return 0;
}
