from sys import stdin N = int(stdin.readline()) A = list(map(int,stdin.readline().split())) B = list(map(int,stdin.readline().split())) ans = 0 now = 0 for i in range(N): if A[i] ^ B[i] == 1: if now == 0: now = 1 ans += 1 else: now = 0 print (ans)