#include const int Mod = 924844033; typedef struct List { struct List *next; int len; long long sum; } list; int main() { char S[3000001]; scanf("%s", S); int i, j, k = 0, n = 0, A[3000001]; for (i = 0; S[i] != 0; i = j) { for (j = i + 1; S[j] == S[i]; j++); if (S[i] == '0') { if (n < j - i) n = j - i; A[k++] = i - j; } else A[k++] = j - i; } int m = 0; long long ans = 1, zero_lr = 1, tmp; list head, tail, d[3000001], *p; head.len = 0; tail.len = n + 1; tail.sum = 0; head.next = &tail; tail.next = NULL; if (A[k-1] < 0) zero_lr = -A[--k] + 1; if (k > 0) { i = 0; if (A[0] < 0) { zero_lr = zero_lr * (-A[0] + 1) % Mod; ans = A[++i]; } else ans = A[i]; for (i += 2, j = i - 1; i < k; i += 2, j += 2) { for (p = &head; p->next->len <= -A[j]; p = p->next); d[m].len = -A[j]; d[m].sum = ans; d[m].next = p->next; head.next = &(d[m++]); for (p = &head, tmp = 0; p->next->len <= n; p = p->next) tmp += p->next->sum * (p->next->len - p->len) % Mod; ans += (tmp % Mod + 1) * A[i] % Mod; if (ans >= Mod) ans -= Mod; } } else zero_lr--; printf("%lld\n", ans * zero_lr % Mod); fflush(stdout); return 0; }