N, K = map(int, input().split()) X = list(map(int, input().split())) A = list(map(int, input().split())) hear = {K-1} cried = set() while len(hear): h = hear.pop() cried.add(h) cdt = X[:] for i, c in enumerate(X): if X[h] - A[h] <= c <= X[h] + A[h] and i not in cried: hear.add(i) cdt.pop(0) X = cdt[:] print(len(cried))