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