You are given two strings $a$ and $b$ consisting of lowercase English letters, both of length $n$. The characters of both strings have indices from $1$ to $n$, inclusive. 

You are allowed to do the following changes:   Choose any index $i$ ($1 \le i \le n$) and swap characters $a_i$ and $b_i$;  Choose any index $i$ ($1 \le i \le n$) and swap characters $a_i$ and $a_{n - i + 1}$;  Choose any index $i$ ($1 \le i \le n$) and swap characters $b_i$ and $b_{n - i + 1}$. 

Note that if $n$ is odd, you are formally allowed to swap $a_{\lceil\frac{n}{2}\rceil}$ with $a_{\lceil\frac{n}{2}\rceil}$ (and the same with the string $b$) but this move is useless. Also you can swap two equal characters but this operation is useless as well.

You have to make these strings equal by applying any number of changes described above, in any order. But it is obvious that it may be impossible to make two strings equal by these swaps.

In one preprocess move you can replace a character in $a$ with another character. In other words, in a single preprocess move you can choose any index $i$ ($1 \le i \le n$), any character $c$ and set $a_i := c$.

Your task is to find the minimum number of preprocess moves to apply in such a way that after them you can make strings $a$ and $b$ equal by applying some number of changes described in the list above.

Note that the number of changes you make after the preprocess moves does not matter. Also note that you cannot apply preprocess moves to the string $b$ or make any preprocess moves after the first change is made.


-----Input-----

The first line of the input contains one integer $n$ ($1 \le n \le 10^5$) — the length of strings $a$ and $b$.

The second line contains the string $a$ consisting of exactly $n$ lowercase English letters.

The third line contains the string $b$ consisting of exactly $n$ lowercase English letters.


-----Output-----

Print a single integer — the minimum number of preprocess moves to apply before changes, so that it is possible to make the string $a$ equal to string $b$ with a sequence of changes from the list above.


-----Examples-----
Input
7
abacaba
bacabaa

Output
4

Input
5
zcabd
dbacz

Output
0



-----Note-----

In the first example preprocess moves are as follows: $a_1 := $'b', $a_3 := $'c', $a_4 := $'a' and $a_5:=$'b'. Afterwards, $a = $"bbcabba". Then we can obtain equal strings by the following sequence of changes: $swap(a_2, b_2)$ and $swap(a_2, a_6)$. There is no way to use fewer than $4$ preprocess moves before a sequence of changes to make string equal, so the answer in this example is $4$.

In the second example no preprocess moves are required. We can use the following sequence of changes to make $a$ and $b$ equal: $swap(b_1, b_5)$, $swap(a_2, a_4)$.

Difficulty: introductory

Starter code:

Solutions:
from math import ceil

n = int(input())

word1 = input()
word2 = input()

combined = []
for i in range(ceil(n / 2)):
    if i > n / 2 - 1:
        combined.append([word1[i], word2[i]])
    else:
        combined.append([word1[i], word1[- i - 1], word2[i], word2[- i - 1]])

count = 0
for l in combined:
    s = set(l)
    if len(s) == 4:
        count += 2
    elif len(s) == 3:
        count += 1
        if l[0] == l[1]:
            count += 1
    elif len(s) == 2:
        counter = 0
        first_letter = l[0]
        for letter in l:
            if letter == first_letter:
                counter += 1
        if counter != 2:
            count += 1
print(count)

def f( a, b, c, d ):
    if (a==b and c==d) or (a==c and b==d) or (a==d and b==c): return 0
    if c==d or b==c or b==d or a==c or a==d: return 1
    return 2

n = int(input())
a, b, s = input(), input(), 0
for i in range(n//2):
    s += f(a[i], a[n-1-i], b[i], b[n-1-i])
if (n & 1) and a[n//2]!=b[n//2]: s += 1
print( s )


length = int(input())
string1 = input()
string2 = input()

changes = 0
for i in range(length // 2):
    c1 = string1[i]
    c2 = string1[length - 1 - i]

    c3 = string2[i]
    c4 = string2[length - 1 - i]

    if c1 == c2 and c3 == c4:
        continue
    if c1 == c3 and c2 == c4:
        continue
    if c1 == c4 and c2 == c3:
        continue
    if c3 == c4:
        changes += 1
        continue
    if c1 == c3 or c2 == c4:
        changes += 1
        continue
    if c1 == c4 or c2 == c3:
        changes += 1
        continue
    changes += 2
if length % 2 == 1 and string1[length // 2] != string2[length // 2]:
    changes += 1
print(changes)



n = int(input().strip())
a = input().strip()
b = input().strip()
ans = 0
v = n//2
for i in range(v):
	j = n-i-1
	if a[i]==b[i]:
		if a[j]!=b[j]:
			ans+=1
	elif a[i]==b[j]:
		if a[j]!=b[i]:
			ans+=1
	elif a[j]==b[j]:
		if a[i]!=b[i]:
			ans+=1
	elif a[j]==b[i]:
		if a[i]!=b[j]:
			ans+=1
	elif a[i]==a[j]:
		if b[i]!=b[j]:
			ans+=2
	elif b[i]==b[j]:
		if a[i]!=a[j]:
			ans+=1
	else:
		ans+=2
if n&1:
	i = (n)//2
	if a[i]!=b[i]:
		ans+=1
print(ans)

#from math import ceil, log

t = 1#int(input())
for test in range(t):
    n = int(input())
    a = input()
    b = input()
    count = 0
    for i in range(n//2):
    	arr = [a[i], a[n-i-1], b[i], b[n-i-1]]
    	tmp = len(set(arr))
    	if tmp==4:
    		count+=2
    	elif tmp==1:
    		continue
    	elif tmp == 2:    		
    		
    		arr.sort()
    		if arr[0] == arr[2] or arr[1]==arr[3]:
    			count+=1
    	else:
    		if a[i] == a[n-i-1]:
    			count+=2
    		else:
    			count+=1

    if n%2==1 and a[n//2]!=b[n//2]:
    	count+=1
    print(count)






n = int(input())
a = input()
b = input()
ans = 0
if n % 2 == 1 and a[n // 2] != b[n // 2]:
    ans += 1
for i in range(0, (n // 2)  ):
    s = sorted([a[i],a[n - 1 - i],b[i],b[n - 1 - i]])
    l = len(set(s))
    if l == 4:
        ans += 2
    if l == 3:
        if a[i] == a[n - 1 - i] :
            ans += 2
        else:
            ans += 1
    if l == 2:
        if s.count(s[0]) != 2:
            ans += 1
    #print(i,ans)
print(ans)

n=int(input())
a=input()
b=input()
count=0
for i in range(n//2):
    d={}
    for c in [a[i],a[n-i-1],b[i],b[n-i-1]]:
        d[c]=d.get(c,0)+1
    if a[i]==a[n-i-1]==b[i]==b[n-i-1]:
        continue
    count+=2
    if a[i]==a[n-i-1] and b[i]!=b[n-i-1] and a[i]!=b[i] and a[i]!=b[n-i-1]:
        continue
    for v in d.values():
        if v>=2:count-=1
if n%2==1 and a[n//2]!=b[n//2]:
    count+=1
print(count)

from sys import stdin
from math import *

line = stdin.readline().rstrip().split()
n = int(line[0])

numbers = stdin.readline().rstrip().split()[0]
numbers2 = stdin.readline().rstrip().split()[0]

moves = 0
for i in range(int(ceil(len(numbers)/2))):
    if i == int(ceil(len(numbers)/2))-1 and len(numbers)%2 == 1:
        if numbers[i] != numbers2[i]:
            moves+=1
        break
    else:
        if numbers2[i] == numbers2[n-(i+1)]:
            if numbers[i] != numbers[n - (i + 1)]:
                moves+=1
        else:
            if numbers[i] == numbers2[i] and  numbers[n-(i+1)] == numbers2[n-(i+1)]:
                moves +=0
            elif numbers[i] == numbers2[n-(i+1)] and  numbers[n-(i+1)] == numbers2[i]:
                moves+=0
            elif numbers[i] == numbers2[i] or numbers[i] == numbers2[n-(i+1)] or numbers[n-(i+1)] == numbers2[i] or numbers[n-(i+1)] == numbers2[n-(i+1)]:
                moves+=1
            else:
                moves+=2
print(moves)

n = int(input())
st1 = list(input())
st2 = list(input())
ans = 0
for i in range(n // 2 + n % 2):
    if i == (n - i - 1):
        if st1[i] != st2[i]:
            ans += 1
        break
    if st2[i] == st2[n - i - 1]:
        if st1[i] != st1[n - i - 1]:
            ans += 1
    else:
        if (st1[i] != st2[i]) and (st1[n - i - 1] != st2[i]):
            ans += 1
        if (st1[i] != st2[n - i - 1]) and (st1[n - i - 1] != st2[n - i - 1]):
            ans += 1

print(ans)


n=int(input())
a=input()
b=input()
o=0
for i in range(n//2):
    if b[i]==b[n-1-i]:
        o+=int(a[i]!=a[n-1-i])
    else:
        o+=2-len(set([a[i],a[n-1-i]])&set([b[i],b[n-1-i]]))
if n%2:
    o+=int(a[n//2]!=b[n//2])
print(o)

n = int(input())
a = list(input())
b = list(input())
x, y = [0] * n, [0] * n
ans = 0
if n % 2 == 1 and a[n // 2] != b[n // 2]: ans += 1

for i in range(n // 2):
    t = [a[i], a[n-i-1], b[i], b[n-i-1]]
    tmp = 0
    tmp1 = 0
    tmp2 = 0
    tmp3 = 0
    xx = 0
    if t[0] != t[2]: tmp1 += 1
    if t[1] != t[3]: tmp1 += 1
    t[0], t[1] = t[1], t[0]

    if t[0] != t[2]: tmp2 += 1
    if t[1] != t[3]: tmp2 += 1

    if t[0] != t[1]:
        t[0] = t[1]
        xx = 1
    if t[0] != t[2]: tmp3 += 1
    if t[1] != t[3]: tmp3 += 1

    if t[0] == t[1] and t[2] == t[3]:
        ans += xx
    else:
        ans += min(tmp1, tmp2, tmp3)

    # print(tmp1, tmp2, t)
    # check = False
    # for i in range(1, 4):
    #     if t[i-1] == t[i]:
    #         if check: check = False
    #         else:
    #             tmp += 1
    #             check = True
    #     else:
    #         if check: check = False

    # print(t, tmp)
    # ans += 2 - tmp

print(ans)

n = int(input())
s1 = input()
s2 = input()

x = []
i = 0
j = n - 1
while i < j:
    x += [[s1[i], s1[j], s2[i], s2[j]]]
    i += 1
    j -= 1

count = 0
for elem in x:
    a1 = elem[0]
    a2 = elem[1]
    b1 = elem[2]
    b2 = elem[3]
    q = set(elem)
    if len(q) == 2:
        if len(set([a1, a2])) * len(set([b1, b2])) == 2:
            count += 1
    elif len(q) == 4:
        count += 2
    elif len(q) == 3:
        if a1 == b2 or a2 == b1 or a1 == b1 or a2 == b2 or b1 == b2:
            count += 1
        else:
            count += 2
if n % 2 == 1:
    if s1[i] != s2[i]:
        count += 1
print(count)
            
        


from collections import Counter
R = lambda: map(int, input().split())

n = int(input())
s1 = input()
s2 = input()

ans = 0
for i in range(n//2):
    t = [s1[i], s1[n-i-1], s2[i], s2[n-i-1]]
    c = sorted(list(Counter(t).values()))
    m = len(c)
    if m == 4:
        ans += 2
    elif m == 3:
        ans += 1
        if s1[i] == s1[n-i-1]:
            ans += 1
    elif m == 2 and c[-1] == 3:
        ans += 1

if n % 2:
    p = (n - 1) // 2
    if s1[p] != s2[p]:
        ans += 1
print(ans)

n = int(input())

a = input()
b = input()

tos = []

for i in range(n):
    if i > n-i-1:
        break
    if i == n-i-1:
        tos.append([ a[i], b[i], "aa", "aa" ] )
        break
    else:
        x = [ a[i], a[n-i-1], b[i], b[n-i-1] ]
        tos.append(x)



def nos(x):
    a = x[:2]
    b = x[2:]

    a.sort()
    b.sort()

    a = "".join(a)
    b = "".join(b)

    if ( a == b ):
        return 0
    if ( b[0] == b[1] ):
        if ( a[0] == a[1] ):
            return 0
        else:
            return 1
    if ( a[0] == b[0] ):
        return 1
    if ( a[0] == b[1] ):
        return 1
    if ( a[1] == b[0] ):
        return 1
    if ( a[1] == b[1] ):
        return 1
    return 2


if ( n == 1):
    if a == b:
        print(0)
    else:
        print(1)
else:
    changes = 0
    for i in tos:
        changes += nos(i)

    print(changes)


n=int(input())
s=input()
s1=input()
ans=0
for i in range(n//2):
    a=s[i]
    b=s[n-1-i]
    x=s1[i]
    y=s1[n-1-i]
    st=set()
    st1=set()
    st2=set()
    st.add(a)
    st.add(b)
    st1.add(x)
    st1.add(y)
    st2.add(a)
    st2.add(b)
    st2.add(x)
    st2.add(y)
    if len(st2)==4:
        ans+=2
    elif len(st2)==3:
        if len(st)==1 and len(st1)==2:
            ans+=2
        if len(st1)==1 and len(st)==2:
            ans+=1
        if len(st1)==2 and len(st)==2:
            ans+=1
        
    elif len(st2)==2:
        if (len(st)==2 or len(st1)==2 ) and (len(st)!=len(st1)):
            ans+=1
if n%2!=0:
    if s[n//2]!=s1[n//2]:
        ans+=1
print(ans)


from collections import Counter
n = int(input())
a = input()[:n]
b = input()[:n]
prelim =0
for i in range(n//2):
    c = Counter([a[i],a[n-1-i],b[i],b[n-1-i]])
    k = len(c)
    if k == 4:
        """
        a x +2op
        b y
        """
        prelim +=2
    elif k == 3:
        """
        a c  +1op
        a b
        
        a a  +2op
        b c
        
        a c  +1op
        b b
        """
        prelim += 2 if a[i]==a[n-1-i] else 1
    elif k==2:
        """
        3 3
        3 5
        
        3 5
        3 3
        
        2 5
        2 5
        """
        if 3 in list(c.values()):
            prelim += 1
if n%2:
    if a[n//2]!=b[n//2]:
        prelim +=1

print(prelim)





from collections import Counter


def main():
	n = int(input())
	a = input()
	b = input()
	a1, b1 = a[::-1], b[::-1]
	n2 = n // 2
	if n % 2 and a[n2] != b[n2]:
		res = 1
	else:
		res = 0
	for i in range(n2):
		ai, a1i = a[i], a1[i]
		bi, b1i = b[i], b1[i]
		if bi == b1i:
			if ai != a1i:
				res += 1
			continue
		cnt1 = Counter((ai, a1i))
		cnt2 = Counter((bi, b1i))
		res += sum((cnt1 - cnt2).values())
	print(res)


main()


n=int(input())
a=input()
b=input()
c=int()
for i in range(n//2):
    v=a[i]
    u=a[n-i-1]
    x=b[i]
    y=b[n-i-1]
    if v==x:
        if u!=y:
            c+=1
    elif v==y:
        if u!=x:
            c+=1
    elif x==y:
        if u!=v:
            c+=1
    else:
        if u!=x and u!=y:
            c+=2
        else:
            c+=1
if n%2==1:
    if a[n//2]!=b[n//2]:
        c+=1
print(c)



n = int(input())

a = input()
b = input()

ans = 0

if n % 2 != 0 and a[n//2] != b[n//2]:
    ans = 1

for i in range(n // 2):
    s = [a[i], b[i], a[n - i - 1], b[n - i - 1]]
    d = dict()
    for j in s:
        if d.get(j):
            d[j] += 1
        else:
            d[j] = 1
    if list(d.values()) != [2, 2] and list(d.values()) != [4]:
        if list(d.values()) == [1, 1, 1, 1]:
            ans += 2
            continue
        if a[i] == a[n - i - 1]:
            if list(d.values()) == [3, 1]:
                ans += 1
            else:
                ans += 2
            continue
        if b[i] == b[n - i - 1]:
            ans += 1
            continue
        ans += 1



print(ans)

n = int(input())
a = input()
b = input()
p = 0
for i in range(n//2):
    if((a[i] != b[i]) and (a[i] != b[n-i-1]) and (a[i] != a[n-i-1])):
        p+=1
        if((b[i] != b[n-i-1]) and (a[n-1-i] != b[i]) and (a[n-1-i] != b[n-i-1]) and (a[n-1-i] != a[i])):
            p+=1
    else:
        if(a[i] == b[i]):
            if(a[n-i-1] != b[n-i-1]):
                p+=1
        elif(a[i] == b[n-i-1]):
            if(a[n-i-1] != b[i]):
                p+=1
        else:
            if(b[n-i-1] != b[i]):
                p+=2
if((a[n//2] != b[n//2]) and (n%2==1)):
    p+=1
print(p)


from collections import defaultdict

n = int(input())
a = input()
b = input()

count = 0
m = n // 2
p = (n - 1) // 2
if n % 2 == 1:
    if a[m] != b[m]:
        count += 1

for i in range(m + (n) % 2):
    d = defaultdict(int)

    d[a[m + i]] += 1
    d[a[p - i]] += 1
    d[b[m + i]] += 1
    d[b[p - i]] += 1

    if all([(i + 1) % 2 for i in list(d.values())]):
        continue

    if b[m + i] == b[p - i] or a[m + i] == b[m + i] or a[m + i] == b[p - i] or a[p - i] == b[m + i] or a[p - i] == b[
        p - i]:
        count += 1
    else:
        count += 2

print(count)


input()
a, b = [], []
for i in input():
    a.append(i)
for i in input():
    b.append(i)
l, r = 0, len(a)-1
ans = 0
while l < r:
    ji = 0
    if a[l] == b[l] or a[r] == b[r] or a[l] == b[r] or a[r] == b[l] or b[l] == b[r]:
        ji = 1

    if (a[l] == b[l] and a[r] == b[r]) or (a[l] == b[r] and a[r] == b[l]):
        ji = 2
    if b[l] == b[r] and a[r] == a[l]:
        ji = 2
    ans += 2-ji
    l += 1
    r -= 1
if l == r and a[l] != b[l]:
    ans += 1
print(ans)


len_str = int(input())
a_str = list(input())
b_str = list(input())

ans = 0


idx_range = int(len_str / 2) if len_str % 2 == 0 else int(len_str/2) + 1
for idx in range(idx_range):
    a_char = [a_str[idx], a_str[len_str - idx - 1]]
    b_char = [b_str[idx], b_str[len_str - idx - 1]]

    char_dict = dict()
    for a in a_char:
        if a in char_dict:
            char_dict[a] += 1
        else:
            char_dict[a] = 1
    for b in b_char:
        if b in char_dict:
            char_dict[b] += 1
        else:
            char_dict[b] = 1
    
    if len(char_dict) == 1 or (len(char_dict) == 2 and char_dict[a_char[0]] == 2):
        continue
    else:
        if b_char[0] == b_char[1]:
            ans += 1
        else:
            if char_dict[b_char[0]] == 2 or char_dict[b_char[1]] == 2:
                ans += 1
            elif char_dict[b_char[0]] == 3 or char_dict[b_char[1]] == 3:
                ans += 1
            else:
                ans += 2

if len_str % 2 == 1:
    mid_idx = int(len_str/2)
    if a_str[mid_idx] != b_str[mid_idx]:
        ans += 1

print(ans)

n = int(input())
a = input()
b = input()

i = n//2
if(n%2 == 0):
    i -= 1
cnt = 0
while i > -1:
    set_a = {a[i], a[-i-1]}
    set_b = {b[i], b[-i-1]}
    if len(set_a) == 1:
        if len(set_b) != 1:
            if (a[i] == b[i]) or (a[i] == b[-i-1]):
                cnt += 1
            else:
                cnt += 2
        if (len(set_b) == 1) and (n%2 == 1) and (n//2 == i) and (set_a != set_b):
            cnt += 1
    if len(set_a) == 2:
        if len(set_b) == 1:
            cnt += 1
        if len(set_b) == 2:
            common = set_a.intersection(set_b)
            if len(common) == 0:
                cnt += 2
            if len(common) == 1:
                cnt += 1
                
    i -= 1
print(cnt)