#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, cnt = 0, a[105], even = 0, odd = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (a[i] % 2)
      odd++;
    else
      even++;
  }
  if (odd % 2) {
    cnt += odd;
  } else {
    cnt += even;
  }
  printf("%d\n", cnt);
  return 0;
}
