import sys input = sys.stdin.readline def f(s, t): return sum(1 if si!=ti else 0 for si, ti in zip(list(s), list(t))) N = int(input()) S = input()[:-1] T = input()[:-1] ans = 10**18 if f(S, T)%2==0: ans = min(ans, f(S, T)) if f(S[::-1], T)%2==1: ans = min(ans, f(S[::-1], T)) assert(ans!=10**18) print(ans)