func_code_string: #include <bits/stdc++.h>   using namespace std;   long long n, i, j, ans = 0;   long long a, b;   const long long M = (long long)1E9 + 7;   long long power(long long x, long long y) {     long long res = 1;     x %= M;     while (y) {       if (y % 2) res = (res * x) % M;       y = y >> 1;       x = (x * x) % M;     }     return res % M;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     string s;     cin >> s;     b = power(2LL, (long long)s.length() - 1);     long long x = 1;     for (i = (long long)s.length() - 1; i >= 0; i--) {       if (s[i] ==  1 ) a += x;       x *= 2;       if (x > M) x %= M;       a %= M;     }     cout << (a * b) % M;   }   