from collections import deque import bisect n,k = map(int,input().split()) x = [int(i) for i in input().split()] a = [int(i) for i in input().split()] ans = [0]*(n) d = deque() d.append(k-1) l = k-1 r = k-1 ans[k-1] = 1 while len(d): tmp = d.popleft() pos = x[tmp] nl = bisect.bisect_left(x,pos-a[tmp]) nr = bisect.bisect_left(x,pos+a[tmp]) #print(nl,nr) #exit() if nl < l: for i in range(nl,l): #print(i,"ll") if ans[i] == 1: break d.append(i) ans[i] = 1 if nr > r: for i in range(nr-1,r,-1): if i >= n: continue #print(i,"rr") if ans[i] == 1: break d.append(i) ans[i] = 1 #exit() l = nl r = nr print(sum(ans))