#include <iostream>
#include <vector>
using namespace std;



main ()

{

 int k = 0;

 int n;

   cin >> n;

   vector <int64_t> a;

   for (int i =0; i<n; i++)
   {
       int l; cin >> l;  a.push_back(l); if (l%2==0) k++;
   }


   cout << k;

   int p= a[0];

   for (int i=1; i<n; i++)
    p= p ^ a[i];

    if (p==0) { while (1==1) cout << "asdasd"; }


}