import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayDeque; import java.util.Queue; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] sa = br.readLine().split(" "); int n = Integer.parseInt(sa[0]); int k = Integer.parseInt(sa[1]) - 1; sa = br.readLine().split(" "); long[] x = new long[n]; for (int i = 0; i < n; i++) { x[i] = Long.parseLong(sa[i]); } sa = br.readLine().split(" "); long[] a = new long[n]; for (int i = 0; i < n; i++) { a[i] = Long.parseLong(sa[i]); } br.close(); Queue que = new ArrayDeque<>(); que.add(k); boolean[] flg = new boolean[n]; flg[k] = true; long min = x[k]; long max = x[k]; while (!que.isEmpty()) { int cur = que.poll(); long l = x[cur] - a[cur]; if (l < min) { min = l; for (int i = cur - 1; i >= 0 && l <= x[i]; i--) { flg[i] = true; que.add(i); } } long r = x[cur] + a[cur]; if (max < r) { max = r; for (int i = cur + 1; i < n && x[i] <= r; i++) { flg[i] = true; que.add(i); } } } int ans = 0; for (int i = 0; i < n; i++) { if (flg[i]) { ans++; } } System.out.println(ans); } }