import java.io.IOException; import java.util.Scanner; class Main{ public static void main(String args[]) throws IOException{ Scanner sc = new Scanner(System.in); int n = sc.nextInt(), k = sc.nextInt()-1; long x[] = new long[n]; long a[] = new long[n]; for(int i = 0; i < n; i++){ x[i] = sc.nextLong(); } for(int i = 0; i < n; i++){ a[i] = sc.nextLong(); } int l = k, r = k; long ld = x[k]-a[k], rd = x[k]+a[k]; boolean update = true; while(update){ update = false; while(l-1 >= 0 && ld <= x[l-1]){ update = true; l--; ld = Math.min(ld, x[l]-a[l]); rd = Math.max(rd, x[l]+a[l]); } while(r+1 < n && x[r+1] <= rd){ update = true; r++; rd = Math.max(rd, x[r]+a[r]); ld = Math.min(ld, x[r]-a[r]); } } System.out.println(r-l+1); } }