As usual, Cuber QQ will come up with a string-related problem to trouble you.
Cuber QQ wants to change the initial string to the string which is made from repetition through swapping adjacent characters in the string.
The string

which is made from repetition satisfies that

can be obtained by concatenating two identical strings

, i.e.,

.
Cuber QQ wants to know the least possible number of swaps of adjacent characters to make the string into the string which is made from repetition.
输入描述:
The first line contains an integer
(
), which denotes the length of the string.
The second line contains a string
, which only contains the lowercase letters of the Latin alphabet.
It is guaranteed that the given string can change to the string which is made from repetition.
输出描述:
Output one integer which denotes the answer.