import bisect n, k = map(int,input().split()) X = list(map(int,input().split())) A = list(map(int,input().split())) r = [0]*n r[k-1] = 1 L = [X[k-1]-A[k-1]] R = [X[k-1]+A[k-1]] lprev, rprev = n-1, 0 left, right = 0, n-1 while not (lprev == left and right == rprev): left = bisect.bisect_left(X,min(L)) right = bisect.bisect_left(X,max(R)) if X[right] != max(R): right -= 1 L = [] R = [] for i in range(left,right+1): r[i] = 1 L.append(X[i]-A[i]) R.append(X[i]+A[i]) lprev = min(lprev,left) rprev = max(rprev,right) print(sum(r))