#include using namespace std; using lint = long long; template using V = vector; template using VV = V< V >; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n, k; cin >> n >> k, --k; V x(n); for (auto&& e : x) cin >> e; V a(n); for (auto&& e : a) cin >> e; int res = -1; lint t = x[k] + a[k]; for (int i = k; i < n; ++i) { if (t < x[i]) break; ++res; t = max(t, x[i] + a[i]); } t = x[k] - a[k]; for (int i = k; i >= 0; --i) { if (x[i] < t) break; ++res; t = min(t, x[i] - a[i]); } cout << res << '\n'; }