#include <iostream>
using namespace std;
const int TEN = 10;
int main() {
int n;
cin >> n;
int noEven = 0;
while (n >= TEN) {
if (((n / TEN) % TEN + n % TEN) % 2 == 0) {
++noEven;
}
n /= TEN;
}
cout << noEven;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY29uc3QgaW50IFRFTiA9IDEwOwoKaW50IG1haW4oKSB7CiAgICBpbnQgbjsKICAgIGNpbiA+PiBuOwogICAgaW50IG5vRXZlbiA9IDA7CiAgICB3aGlsZSAobiA+PSBURU4pIHsKICAgICAgICBpZiAoKChuIC8gVEVOKSAlIFRFTiArIG4gJSBURU4pICUgMiA9PSAwKSB7CiAgICAgICAgICAgICsrbm9FdmVuOwogICAgICAgIH0KICAgICAgICBuIC89IFRFTjsKICAgIH0KICAgIGNvdXQgPDwgbm9FdmVuOwogICAgcmV0dXJuIDA7Cn0=