def min_operations(N, S, T): S = list(S) T = list(T) operations = 0 flip = 0 for i in range(N-1, -1, -1): if (S[i] == T[i] and flip % 2 == 0) or (S[i] != T[i] and flip % 2 == 1): continue else: flip += 1 operations += 1 return operations N = int(input().strip()) S = input().strip() T = input().strip() print(min_operations(N, S, T))