You're given a string S, consisting only of lowercase Latin letters. Find whether it is possible to convert it into a palindrome by inserting only one character.
If it is possible, return the index (0-based Index) where the character should be inserted. If there is more than one, return the smallest one. If it is not possible, return -1.
A single line containing the word to transform S.
The index (0-based Index) where the character should be inserted or -1.
1 ≤ length of S ≤ 100
Input
aa
Output
0