#!/usr/bin/env python3 import sys def main(): from collections import deque INF = 10 ** 16 def bfs(edges: "List[to]", start_node: int) -> list: q = deque() dist = [INF] * len(edges) q.append(start_node) dist[start_node] = 0 while q: now = q.popleft() for next in edges[now]: if dist[next] != INF: continue q.append(next) dist[next] = dist[now] + 1 return dist import bisect N, K = map(int, input().split()) X = list(map(int, input().split())) A = list(map(int, input().split())) G = [[] for _ in range(N)] for i in range(N): l = bisect.bisect_left(X, X[i] - A[i]) r = bisect.bisect_right(X, X[i] + A[i]) for j in range(l, r): if i == j: continue G[i].append(j) d = bfs(G, K - 1) print(N - d.count(INF)) return if __name__ == '__main__': main()