// yukicoder No.1070 #include using namespace std; int main() { string s; cin >> s; int lim = s.size(); int z_counter = 0; for(int i = 0; i < lim; ++i) { if(s[i] == '0') ++z_counter; else continue; } int ans = (lim - 1) - z_counter; cout << ans << "\n"; return 0; }