#agc026c. [agc026_c]String Coloring
[agc026_c]String Coloring
Problem Statement
You are given a string of length consisting of lowercase English letters.
There are ways to color each character in red or blue. Among these ways, how many satisfy the following condition?
- The string obtained by reading the characters painted red from left to right is equal to the string obtained by reading the characters painted blue from right to left.
Constraints
- The length of is .
- consists of lowercase English letters.
Input
Input is given from Standard Input in the following format:
Output
Print the number of ways to paint the string that satisfy the condition.
Sample Input 1
4
cabaacba
Sample Output 1
4
There are four ways to paint the string, as follows:
- c