N,K = map(int,input().split()) frogs_p = [int(i) for i in input().split()]#蛙の位置 frogs_v = [int(i) for i in input().split()]#蛙の鳴き声の大きさ cnt = 1 #K番目が鳴いた時、声が響く区間 section=[frogs_p[K-1]-frogs_v[K-1],frogs_p[K-1]+frogs_v[K-1]] #Kより手前について for i in range(1,K+1): if section[0] <= frogs_p[K-1-i]:#?in range とどちらが早いか section[0] = frogs_p[K-1-i] - frogs_v[K-1-i] cnt +=1 else:break #Kより後について for i in range(1,N-K+1): if section[1] >= frogs_p[K-1+i]: section[1] = frogs_p[K-1+i]+frogs_v[K-1+i] cnt +=1 print(cnt)