N=int(input()) A=list(map(int,input().split())) B=list(map(int,input().split())) LIST=[0]*(N+1) now=0 for i in range(N): if B[i]==1: now^=(1<