a=[int(i) for i in input().split()] b=[int(i) for i in input().split()] c=[int(i) for i in input().split()] d=1 for i in b: if (b[a[1]-1]>=i) and (b[a[1]-1]-c[a[1]-1]<=i): d+=1