#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3", "unroll-loops")
long long mod = 1e9 + 7;
int32_t main() {
  ;
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  ;
  cout << fixed << setprecision(20);
  ;
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long sum = accumulate(a, a + n, 0LL);
  long long cnt = 0;
  for (long long i = 0; i < n; i++)
    if ((sum - a[i]) % 2 == 0) cnt++;
  cout << cnt << endl;
  return 0;
}
