Positive String

아직 제출이 없습니다시간 제한2초메모리 제한1024 MB

문제

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 SS (1S200,0001 \leq |S| \leq 200\\,000), consisting of lowercase English letters only.

출력

Output a single integer denoting the number of positive substrings of SS.