Count palindromes#11592

Count palindromes

1 second
128 megabytes
Medium

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 in several ways:

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 modulo 10^9 + 7.

Examples

Example 1

Loading
Loading