N = int(input()) S = list(input()) T = list(input()) Sr = S[::-1] cnt1, cnt2 = 0, 0 for i in range(N): if S[i] != T[i]: cnt1 += 1 if Sr[i] != T[i]: cnt2 += 1 if Sr == T: cnt2 = 2 print( min(cnt1, cnt2) )