#C3902. Count Palindromic Substrings
Count Palindromic Substrings
Count Palindromic Substrings
Given a string \( S \), count the number of palindromic substrings in \( S \). A substring is considered palindromic if it reads the same backward as forward. Note that every single character is inherently a palindrome.
For example, if \( S = \texttt{abba} \), the palindromic substrings are: \( \texttt{a, b, b, a, bb, abba} \), totaling \( 6 \) palindromes. Use an efficient center expansion approach to solve this problem.
inputFormat
The input consists of a single line containing the string \( S \) (which may include both lowercase and uppercase letters).
outputFormat
Output the total number of palindromic substrings in \( S \) as an integer.
## samplea
1