{"raw_statement":[{"iden":"problem statement","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."},{"iden":"constraints","content":"*   $1 \\leq |S| \\leq 300$\n*   $S$ consists of `0` and `1`."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$S$"},{"iden":"sample input 1","content":"0001"},{"iden":"sample output 1","content":"8\n\nEight strings, `0001`, `001`, `010`, `00`, `01`, `10`, `0`, and `1`, can result."},{"iden":"sample input 2","content":"110001"},{"iden":"sample output 2","content":"24"},{"iden":"sample input 3","content":"11101111011111000000000110000001111100011111000000001111111110000000111111111"},{"iden":"sample output 3","content":"697354558"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}