CF486C Palindrome Transformation
Description
Nam is playing with a string on his computer. The string consists of $ n $ lowercase English letters. It is meaningless, so Nam decided to make the string more beautiful, that is to make it be a palindrome by using 4 arrow keys: left, right, up, down.
There is a cursor pointing at some symbol of the string. Suppose that cursor is at position $ i $ ( $ 1
Input Format
The first line contains two space-separated integers $ n $ ( $ 1
Output Format
Print the minimum number of presses needed to change string into a palindrome.
Explanation/Hint
A string is a palindrome if it reads the same forward or reversed.
In the sample test, initial Nam's string is:  (cursor position is shown bold).
In optimal solution, Nam may do $ 6 $ following steps:
The result, , is now a palindrome.