The palindrome is a string with a length greater than one character that reads the same both from right to left and left to right. A superpalindrome is a string that can be represented as the concatenation of one or more palindromes.
You are given a string . Find the number of substrings in that are superpalindromes.
The string that consists of a sequence of lowercase Latin letters with a length from to , without spaces.
Print a single integer — the number of substrings of the string that are superpalindromes.
Example 1
Example 2