N,K = map(int,input().split()) X = list(map(int,input().split())) A = list(map(int,input().split())) ans = 0 now = X[K-1] + A[K-1] for i in range(K,N): if X[i] <= now: ans += 1 if X[i] + A[i] > now: now = X[i] + A[i] now = X[K-1] - A[K-1] for i in reversed(range(K-1)): if X[i] >= now: ans += 1 if X[i] - A[i] < now: now = X[i] - A[i] print(ans + 1)