{"problem":{"name":"Secret Passage","description":{"content":"Given is a string $S$ consisting of `0` and `1`. Find the number of strings, modulo $998244353$, that can result from applying the following operation on $S$ zero or more times: *   Remove the two ch","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"agc046_d"},"statements":[{"statement_type":"Markdown","content":"Given is a string $S$ consisting of `0` and `1`. Find the number of strings, modulo $998244353$, that can result from applying the following operation on $S$ zero or more times:\n\n*   Remove the two characters at the beginning of $S$, erase one of them, and reinsert the other somewhere in $S$. This operation can be applied only when $S$ has two or more characters.\n\n## Constraints\n\n*   $1 \\leq |S| \\leq 300$\n*   $S$ consists of `0` and `1`.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$S$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"agc046_d","tags":[],"sample_group":[["0001","8\n\nEight strings, `0001`, `001`, `010`, `00`, `01`, `10`, `0`, and `1`, can result."],["110001","24"],["11101111011111000000000110000001111100011111000000001111111110000000111111111","697354558"]],"created_at":"2026-03-03 11:01:14"}}