#include using namespace std; int main() { string c; cin >> c; int n = c.size(); int ans = 0; for(int i = 1; i < n; ++i) { if(c[i] != '0') { ++ans; } } cout << ans << '\n'; return 0; }