n, k = map(int, input().split()) X = [-10 ** 20] + list(map(int, input().split())) + [10 ** 20] A = [0] + list(map(int, input().split())) + [0] ans = 1 min_ = X[k] - A[k] for i in range(k - 1, -1, -1): if X[i] < min_: break ans += 1 min_ = min(min_, X[i] - A[i]) max_ = X[k] + A[k] for i in range(k + 1, n + 2): if X[i] > max_: break ans += 1 max_ = max(max_, X[i] + A[i]) print(ans)