func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     ios::sync_with_stdio(false);     cin.tie(0);     string s;     deque<char> vec;     cin >> s;     for (int i = 0; i < s.size(); ++i) vec.push_back(s[i]);     int cnt = 0, i;     while (vec.size() > 1) {       if (vec[vec.size() - 1] ==  0 ) {         ++cnt;         vec.pop_back();       } else {         for (i = vec.size() - 1; i >= 0; --i) {           if (vec[i] ==  0 ) break;           vec[i] =  0 ;         }         if (i < 0)           vec.push_front( 1 );         else           vec[i] =  1 ;         ++cnt;       }     }     cout << cnt;     return 0;   }   