#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int count = 0;
  int st[100];
  for (int i = 0; i < n; ++i) cin >> st[i];
  int sum = 0;
  for (int i = 0; i < n; ++i) sum = sum + st[i];
  for (int i = 0; i < n; ++i)
    if ((sum - st[i]) % 2 == 0) count++;
  cout << count;
  return 0;
}
