N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) C = [(A[i] - B[i]) % 2 for i in range(N)] res = 0 for i in range(N-1): res += (C[i] == 1 and C[i+1] == 0) if C[-1] == 1: res += 1 print(res)