N,K=map(int, input().split()) X=list(map(int, input().split())) A=list(map(int, input().split())) l,r=K-1,K-1 L,R=X[l]-A[l],X[r]+A[r] while (r+10 and X[l-1]>=L): if r+10 and X[l-1]>=L: l-=1 R=max(X[l]+A[l],R) L=min(X[l]-A[l],L) print(r-l+1)