N,K=map(int,input().split()) inf=float("inf") X=list(map(int,input().split())) X=[-inf]+X+[inf] A=list(map(int,input().split())) A=[0]+A+[0] p=q=K while X[p]-A[p]<=X[p-1]: p-=1 while X[q+1]<=X[q]+A[q]: q+=1 print(q-p+1)