#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define popcount __builtin_popcount using namespace std; using namespace atcoder; typedef long long ll; typedef pair P; using mint=static_modint<924844033>; using S=pair; using F=pair; S op(S a, S b){ return S(a.first+b.first, a.second+b.second); } S e(){ return S(0, 1); } S mapping(F f, S x){ if(f.first) return S(x.first+f.second*x.second, x.second); else return S(f.second*x.second, x.second); } F composition(F f, F g){ if(f.first) return make_pair(g.first, f.second+g.second); else return make_pair(0, f.second); } pair id(){ return make_pair(1, 0); } int main() { string s; cin>>s; int n=s.size(); int l=0; while(l=0 && s[r]=='0') r--; mint c=mint(l+1)*mint(n-r); s=s.substr(l, r-l+1); n=s.size(); int lmx=0; int i=0; while(s[i]=='1') i++; lmx=max(lmx, i); while(i seg(lmx+1); i=0; while(s[i]=='1') i++; seg.apply(0, lmx+1, make_pair(1, i)); mint v=1; while(i