import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt() - 1; long[] idxes = new long[n]; for (int i = 0; i < n; i++) { idxes[i] = sc.nextLong(); } long[] values = new long[n]; for (int i = 0; i < n; i++) { values[i] = sc.nextLong(); } long left = idxes[k] - values[k]; long right = idxes[k] + values[k]; int plus = k; int minus = k; int plusOrg = -1; int minusOrg = -1; while (plus != plusOrg || minus != minusOrg) { plusOrg = plus; minusOrg = minus; while (plus < n - 1 && idxes[plus + 1] <= right) { plus++; right = Math.max(right, idxes[plus] + values[plus]); left = Math.min(left, idxes[plus] - values[plus]); } while(minus > 0 && idxes[minus - 1] >= left) { minus--; left = Math.min(left, idxes[minus] - values[minus]); right = Math.max(right, idxes[minus] + values[minus]); } } System.out.println(plus - minus + 1); } }