N = int(input()) A = list(map(int,input().split())) B = list(map(int,input().split())) f = 0 ans = 0 for k in range(N): if A[k] != B[k]: if f == 0: ans += 1 f = 1 else: f = 0 print(ans)