import sys input = sys.stdin.readline N, K = map(int, input().split()) K -= 1 X = list(map(int, input().split())) A = list(map(int, input().split())) l, r = K, K ld, rd = X[K] - A[K], X[K] + A[K] update = True while update: update = False if l - 1 >= 0 and ld <= X[l-1]: update = True l -= 1 ld = min(ld, X[l] - A[l]) rd = max(rd, X[l] + A[l]) if r + 1 < N and X[r+1] <= rd: update = True r += 1 rd = max(rd, X[r] + A[r]) ld = min(ld, X[r] - A[r]) print(r - l + 1)