NUMOFPAL - Number of Palindromes

题意翻译

求一个串中包含几个回文串 感谢@yler 提供翻译

题目描述

Each palindrome can be always created from the other palindromes, if a single character is also a palindrome. For example, the string "malayalam" can be created by some ways: \* malayalam = m + ala + y + ala + m \* malayalam = m + a + l + aya + l + a + m We want to take the value of function NumPal(s) which is the number of different palindromes that can be created using the string S by the above method. If the same palindrome occurs more than once then all of them should be counted separately.

输入输出格式

输入格式


The string S.

输出格式


The value of function NumPal(s).

输入输出样例

输入样例 #1

malayalam

输出样例 #1

15

说明

**Limitations** 0 < |s| <= 1000