from collections import deque N, K = map(int, input().split()) K -= 1 X = list(map(int, input().split())) A = list(map(int, input().split())) left = X[K] - A[K] right = X[K] + A[K] q = deque([K]) update = True while update: update = False hd = q[0] if hd > 0 and left <= X[hd-1]: update = True left = min(left, X[hd-1] - A[hd-1]) right = max(right, X[hd-1] + A[hd-1]) q.appendleft(hd-1) tl = q[-1] if tl+1 < N and X[tl+1] <= right: update = True left = min(left, X[tl+1] - A[tl+1]) right = max(right, X[tl+1] + A[tl+1]) q.append(tl+1) print(len(q))