#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
freopen("STR.INP","r",stdin);
freopen("STR.OUT","w",stdout);
string s;
cin >> s;
int count = 0;
for (char c : s) {
if (c != '0' && c != '1') {
count++;
}
}
cout << count;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmludCBtYWluKCkgewogICAgaW9zOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpOwogICAgY2luLnRpZShudWxscHRyKTsKICAgIGZyZW9wZW4oIlNUUi5JTlAiLCJyIixzdGRpbik7CiAgICBmcmVvcGVuKCJTVFIuT1VUIiwidyIsc3Rkb3V0KTsKICAgIHN0cmluZyBzOwogICAgY2luID4+IHM7CiAgICBpbnQgY291bnQgPSAwOwogICAgZm9yIChjaGFyIGMgOiBzKSB7CiAgICAgICAgaWYgKGMgIT0gJzAnICYmIGMgIT0gJzEnKSB7CiAgICAgICAgICAgIGNvdW50Kys7CiAgICAgICAgfQogICAgfQogICAgY291dCA8PCBjb3VudDsKICAgIHJldHVybiAwOwp9