#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long LL; typedef unsigned long long ULL; #define MEM(a,b) memset((a),(b),sizeof(a)) const LL INF = 1e9 + 7; const int N = 2e5 + 10; int main() { //freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); string str; cin >> str; int ans = 0; for (int i = 1; i < str.length(); i++) { if (str[i] != '0') ans++; } cout << ans << endl; return 0; }