#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int even = 0, odd = 0;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x & 1)
      odd++;
    else
      even++;
  }
  if (odd % 2 == 0)
    cout << even;
  else
    cout << odd;
}
