#include <iostream>
using namespace std;
int v[1005], n, cif, i, nrp, nri, nrpare;
int main()
{
cin >> n;
for(i = 1; i <= n; i ++)
{
cin >> v[i];
nrp = nri = 0;
while(v[i])
{
cif = v[i] % 10;
if(cif % 2 == 0) nrp ++;
else nri ++;
v[i] = v[i] / 10;
}
if(nrp > nri) nrpare ++;
}
cout << nrpare;
return 0;
}