n, k = map(int, input().split()) X = list(map(int, input().split())) A = list(map(int, input().split())) X.sort() g = [[] for _ in range(n)] for i in range(1, n): if X[i]-A[i]<= X[i-1]: g[i].append(i-1) if X[i-1]+A[i-1] >= X[i]: g[i-1].append(i) #print(g) from collections import deque s = deque() s.append(k-1) visit = [0]*n visit[k-1] = 1 while s: x = s.pop() for nx in g[x]: if visit[nx] == 0: visit[nx] = 1 s.append(nx) #print(visit) print(sum(visit))