#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; bool is_prime(long long N){ if (N == 0 || N == 1) return false; for (long long i=2; i*i<=N; i++){ if (N % i == 0) return false; } return true; } int main(){ string S; cin >> S; ll ans=0, sm, N=S.size(), s; for (int i=0; i<(1<<(N-1)); i++){ sm = 0; s = S[0]-'0'; for (int j=0; j