#include #include #include using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000001 int main(){ string S; cin>>S; int N = S.size(); vector dp(63,vector(1900,0)); dp[0][0] = 1; rep(i,N){ vector ndp(63,vector(1900,0)); rep(j,63){ rep(k,1900){ if(dp[j][k]==0)continue; ndp[j][k] += dp[j][k]; ndp[j+1][k+i] += dp[j][k]; } } swap(dp,ndp); } int c = 0,s = 0; rep(i,N){ if(S[i]=='1'){ c++; s+=i; } } cout<