from collections import deque from bisect import bisect_left, bisect_right N, K = map(int, input().split()) X = list(map(int, input().split())) A = list(map(int, input().split())) K -= 1 q = deque() q.append(K) lk = rk = K l = r = X[K] while len(q): k = q.popleft() _l = X[k] - A[k] _r = X[k] + A[k] if _l < l: _lk = bisect_left(X, _l) if _lk < lk: for i in range(lk-1, _lk-1, -1): q.append(i) lk = _lk l = _l if _r > r: _rk = bisect_right(X, _r) if _rk > rk: for i in range(rk+1, _rk): q.append(i) rk = _rk r = _r print(rk - lk or 1)