I. Range Flips
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

You are given two strings $$$s$$$ and $$$t$$$ of lowercase English letters each of length $$$n.$$$

For every lowercase English letter, let its value be the number of letters between it and a in the ordered alphabet (e.g. the value of a is 0, value of z is 25).

We call the reverse of a letter with value $$$val$$$ to be the letter with value $$$25-val$$$ (e.g. the reverse of a is z, the reverse of c is z).

We call the opposite of a letter with value $$$val$$$ to be the letter with value equivalent to $$$val+13\pmod{26}$$$ (e.g. the opposite of a is n, the opposite of m is b).

In one move, you choose a contiguous range of letters in $$$s$$$ and replace each letter in the range with its reverse, or replace each letter in the range with its opposite.

Determine the minimum number of moves it will take to transform $$$s$$$ into $$$t,$$$ or output $$$-1$$$ if it is not possible.

Input

The first line contains an integer $$$n$$$ $$$(1\le n\le 10^6)$$$ — the length of the two strings.

The second line contains a string $$$s$$$ of length $$$n,$$$ consisting of lowercase English letters.

The third line contains a string $$$t$$$ of length $$$n,$$$ consisting of lowercase English letters.

Output

Output a single integer, representing the minimum number of moves to transform $$$s$$$ into $$$t,$$$ or $$$-1$$$ if it is not possible.

Examples
Input
5
abcde
abcde
Output
0
Input
5
aaaaa
znmnm
Output
4
Input
1
a
b
Output
-1
Input
5
ngomc
mtyzk
Output
3
Input
7
ptacnld
cgacmlj
Output
4
Input
7
ugrcnkm
sgvcapz
Output
5