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=K Left=X[K]-A[K] while Left<=X[p-1]: Left=min(Left,X[p-1]-A[p-1]) p-=1 q=K Right=X[K]+A[K] while X[q+1]<=Right: Right=max(Right,X[q+1]+A[q+1]) q+=1 print(q-p+1)