n = int(input()) s = input() t = input() u = 0 ans = 0 for i in range(n): u += int(s[i]) u += int(t[i]) if u % 2: s = s[::-1] for i in range(n): if s[i] != t[i]: ans += 1 print(ans)