{"problem":{"name":"Substrings","description":{"content":"Given is a string $S$. From this string, Takahashi will make a new string $T$ as follows. *   First, mark one or more characters in $S$. Here, no two marked characters should be adjacent. *   Next, d","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc214_f"},"statements":[{"statement_type":"Markdown","content":"Given is a string $S$. From this string, Takahashi will make a new string $T$ as follows.\n\n*   First, mark one or more characters in $S$. Here, no two marked characters should be adjacent.\n*   Next, delete all unmarked characters.\n*   Finally, let $T$ be the remaining string. Here, it is forbidden to change the order of the characters.\n\nHow many strings are there that can be obtained as $T$? Find the count modulo $(10^9 + 7)$.\n\n## Constraints\n\n*   $S$ is a string of length between $1$ and $2 \\times 10^5$ (inclusive) consisting of lowercase English letters.\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":"abc214_f","tags":[],"sample_group":[["abc","4\n\nThere are four strings that can be obtained as $T$: `a`, `b`, `c`, and `ac`.\nMarking the first character of $S$ yields `a`;\nmarking the second character of $S$ yields `b`;\nmarking the third character of $S$ yields `c`;\nmarking the first and third characters of $S$ yields `ac`.\nNote that it is forbidden to, for example, mark both the first and second characters."],["aa","1\n\nThere is just one string that can be obtained as $T$, which is `a`. Note that marking different positions may result in the same string."],["acba","6\n\nThere are six strings that can be obtained as $T$: `a`, `b`, `c`, `aa`, `ab`, and `ca`."],["chokudai","54"]],"created_at":"2026-03-03 11:01:13"}}