import sys from collections import defaultdict MOD = 924844033 def main(): s = sys.stdin.readline().strip() if not s: print(0) return # Split into runs runs = [] current = s[0] count = 1 for c in s[1:]: if c == current: count += 1 else: runs.append((current, count)) current = c count = 1 runs.append((current, count)) dp = defaultdict(int) dp[0] = 1 for block in runs: char, length = block if char == '0': new_dp = defaultdict(int) for m in dp: p = dp[m] # Option 1: keep the 0 run new_dp[0] = (new_dp[0] + p * length) % MOD # Option 2: remove the 0 run new_dp[m] = (new_dp[m] + p) % MOD dp = new_dp else: new_dp = defaultdict(int) for m in dp: p = dp[m] new_m = m + length new_dp[new_m] = (new_dp[new_m] + p) % MOD dp = new_dp total = 0 for m in dp: total = (total + dp[m] * m) % MOD print(total % MOD) if __name__ == "__main__": main()