import java.util.*; import java.io.*; public class Main { public static void main (String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] first = br.readLine().split(" ", 2); int n = Integer.parseInt(first[0]); int k = Integer.parseInt(first[1]) - 1; String[] second = br.readLine().split(" ", n); String[] third = br.readLine().split(" ", n); Frog[] frogs = new Frog[n]; for (int i = 0; i < n; i++) { frogs[i] = new Frog(Long.parseLong(second[i]), Long.parseLong(third[i])); } int left = k; int right = k; long min = frogs[k].position - frogs[k].strength; long max = frogs[k].position + frogs[k].strength; boolean flag = true; while (flag) { flag = false; while (left > 0 && frogs[left - 1].position >= min) { min = Math.min(min, frogs[left - 1].position - frogs[left - 1].strength); left--; flag = true; } while (right < n - 1 && frogs[right + 1].position <= max) { max = Math.max(max, frogs[right + 1].position + frogs[right + 1].strength); right++; flag = true; } } System.out.println(right - left + 1); } static class Frog { long position; long strength; public Frog(long position, long strength) { this.position = position; this.strength = strength; } } }