#include using namespace std; typedef long long ll; int main() { int N, K; cin >> N >> K; ll X[N], A[N]; for (int i = 0; i < N; i++) { cin >> X[i]; } for (int i = 0; i < N; i++) { cin >> A[i]; } K--; ll r = X[K] + A[K]; ll l = X[K] - A[K]; int idr = K + 1; int idl = K - 1; int cnt = 1; while (idr < N || idl >= 0) { if (idr < N && X[idr] <= r) { r = max(r, X[idr] + A[idr]); l = min(l, X[idr] - A[idr]); cnt++; idr++; } else if (idl >= 0 && l <= X[idl]) { r = max(r, X[idl] + A[idl]); l = min(l, X[idl] - A[idl]); cnt++; //cout << idl << "\n"; idl--; } else { break; } } //cout << l << " " << r << "\n"; cout << cnt << "\n"; return 0; }