import itertools _ = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) C = [a != b for a, b in zip(A, B)] ans = [] for k, g in itertools.groupby(C): ans.append(k) print(sum(ans))