#include #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef long long ll; int main() { string C; cin >> C; int ans = 0; rep(i, C.size() - 1) { if (C[i + 1] != '0') ans++; } cout << ans << "\n"; }