#include using namespace std; int main() { string s; cin >> s; regex_replace(s, regex("0"), ""); cout << s.size() - 1 << endl; return 0; }