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] == 0 and C[i+1] == 1) if C[-1] == 1: res += 1 print(res)