#include <bits/stdc++.h>
using namespace std;
const long long LLINF = 9223372036854775807LL;
const int INF = 2147483647;
const int MOD = 1000000007;
const double eps = 1e-7;
const double PI = acos(-1.0);
int dr[] = {1, 0, -1, 0, -1, 1, 1, -1};
int dc[] = {0, -1, 0, 1, 1, 1, -1, -1};
int main() {
  int sum = 0, odd = 0, even = 0, n, arr[105];
  scanf("%d", &n);
  for (int(i) = (1); (i) <= (n); (i)++) {
    scanf("%d", &arr[i]);
    sum += arr[i];
    if (arr[i] & 1)
      odd++;
    else
      even++;
  }
  if (sum & 1)
    printf("%d\n", odd);
  else
    printf("%d\n", even);
  return 0;
}
