You are given a string . You want to remove the most number of characters to make the string a palindrome.
A palindrome is defined as a string of length greater than or equal to that is the same forwards as it is backwards.
Input Specification
The first line will contain the string . is guaranteed to only contain lowercase alphabetical characters.
Output Specification
Print the maximum number of characters that can be removed to make the string a palindrome.
Sample Input
jsumabatroooheart
Sample Output
16
Comments