Count palindromes
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Each palindrome can be always created from the other palindromes, if a single character is also a palindrome. For example, the string "bobseesanna" can be created by some ways:
bobseesanna = bob + sees + anna
bobseesanna = bob + s + ee + s + anna
bobseesanna = b + o + b + sees + a + n + n + a
...
Find the number of different ways to create the string from palindromes.
Input
One string of length no more than .
Output
Print the number of different ways to create the string from palindromes. Print the answer by the modulo .
Examples
Input #1
Answer #1
Submissions 28
Acceptance rate 36%