n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) cnt = 0 for i in range(n): if (a[i] != b[i]): if (i == 0 or (i != 0 and a[i - 1] == b[i - 1])): cnt += 1 print(cnt)