cat<<EOF>Source.cpp

#include "immintrin.h"

extern "C"{
int printf (const char *__restrict __format, ...);
int scanf (const char *__restrict __format, ...) ;
}

const int B=1024;
const int N=205000/B*B;
int a[N],b[N],c[N];

int main(){
	int n;scanf("%d",&n);
	for(int i=0;i<n;i++)scanf("%d",&a[i]);
	for(int i=0;i<n;i++)scanf("%d",&b[i]);
	int ans=0;
	if(n%2){
		for(int i=0;i<n;i++)ans^=a[i]^b[i];
	}
	#pragma omp parallel for
	for(int i=0;i<n;i+=B){
		for(int j=0;j<n;j+=B){
			for(int k=i;k<i+B;k++){
				for(int t=j;t<j+B;t++){
					c[k]^=a[k]+b[t];
				}
			}
		}
	}
	for(int i=0;i<n;i++)ans^=c[i];
	printf("%d\n",ans);
}
EOF
g++ -Ofast Source.cpp -o Source -fopenmp -msse4
./Source