n = int(input()) s = input() t = input() cnt = 0 for a, b in zip(s, t): cnt += (a != b) ans = cnt cnt = 0 for a, b in zip(s[::-1], t): cnt += (a != b) ans = min(ans, cnt) print(ans)