import sys input = sys.stdin.readline from bisect import * from collections import deque class UnionFind: def __init__(self, num): self.rank = [0] * num self.par = [i for i in range(num)] self.n = num def find_root(self, node): if self.par[node] == node: return node else: self.par[node] = self.find_root(self.par[node]) return self.par[node] def same_root(self, x, y): return self.find_root(x) == self.find_root(y) def union(self, x, y): x = self.find_root(x) y = self.find_root(y) if x == y: return if self.rank[x] > self.rank[y]: self.par[y] = x else: self.par[x] = y if self.rank[x] == self.rank[y]: self.rank[y] += 1 N,K = map(int,input().split()) X = list(map(int,input().split())) A = list(map(int,input().split())) UF = UnionFind(N) q = deque([K-1]) ok = [False]*N ok[K-1] = True while q : indn = q.popleft() x = X[indn] indl = bisect_left(X,x-A[indn]) for j in range(indl,indn) : if ok[j] : continue ok[j] = True q.append(j) indr = bisect_right(X,x+A[indn])-1 for j in range(indn+1,indr+1) : if ok[j] : continue ok[j] = True q.append(j) print(ok.count(True))