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 True: left = bisect.bisect_left(X,min(L)) right = min(n-1,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]) tmpl,lprev = lprev, min(left,lprev) tmpr,rprev = rprev, min(right,rprev) if tmpl == lprev and tmpr == rprev: break print(sum(r))