N,K = map(int,input().split()) X = list(map(int,input().split())) A = list(map(int,input().split())) K -= 1 migi = X[K] + A[K] hidari = X[K] - A[K] stack = [(K,1),(K,-1)] ans = 1 while stack: now,d = stack.pop() if 0 <= now + d < N and hidari <= X[now + d] <= migi: migi = max(migi,X[now + d] + A[now + d]) hidari = min(hidari,X[now + d] - A[now + d]) stack.append((now + d,d)) ans += 1 print(ans)