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: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF486C/c2c9513e216627ba8dba5e20f24d19bb9e05137a.png) (cursor position is shown bold). In optimal solution, Nam may do $ 6 $ following steps: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF486C/69c8590618c960ba2fbb8128394f526e54e905cd.png)The result, ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF486C/f8fb95d3cc7310b730ff830a0c29f176cf3c201f.png), is now a palindrome.