Let us call a string of length greater than one a palindrome if it reads the same from left to right and from right to left.
A superpalindrome is a string that can be represented as a concatenation of one or more palindromes.
Given a string , find the number of substrings of that are superpalindromes.
One string s~(1 \le |s| \le 1000) consisting of lowercase Latin letters.
Print one integer — the number of substrings of the string that are superpalindromes.
Example 1
Example 2