Grammy had a unique insight about strings. She thinks that a string is positive if and only if it is lexicographically larger than its reversal.
Now you are given a string, please find out how many contiguous substrings of it are positive according to Grammy's insight.
The single line contains a string S (1≤∣S∣≤200,000), consisting of lowercase English letters only.
Output a single integer denoting the number of positive substrings of S.