#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, d;
  cin >> n >> d;
  vector<long long> s(n), p(n);
  for (long long i = 0; i < n; i++) cin >> s[i];
  for (long long i = 0; i < n; i++) cin >> p[i];
  s[d - 1] += p[0];
  reverse((p).begin(), (p).end());
  for (long long i = d - 1; i < n; i++) p.pop_back();
  long long c = 1;
  for (long long i = d - 2; i >= 0; i--) {
    while (p.size() && p.back() + s[i] > s[d - 1]) p.pop_back();
    if (p.empty()) {
      c = i + 2;
      break;
    } else
      p.pop_back();
  }
  cout << c;
  return 0;
}
