A string is called a palindrome if it reads the same from left to right and from right to left. For example, the string "abba" is a palindrome, while "omax" is not. A substring of string from position to position inclusive (positions are numbered from ) is denoted as . The length of such a substring is j - i + 1.
For the given string of length , find the number of pairs such that 1 \le i < j \le n and the substring is a palindrome.
The input consists of a string of length n~(1 \le n \le 10^5), composed of lowercase Latin letters.
Print the number of required pairs .
Example 1
Example 2
Example 3