#include <bits/stdc++.h>
using namespace std;
using pii = pair<long long int, long long int>;
using vi = vector<long long int>;
using vpii = vector<pii>;
using G = vector<vi>;
using WG = vector<vpii>;
const long long int INF = 0x3f3f3f3f;
const long long int mod = 1e9 + 7;
const long long int mod2 = 1e9 + 9;
mt19937 rng(46);
int32_t main() {
  ios::sync_with_stdio(0);
  long long int n, d;
  cin >> n >> d;
  vi s(n + 1), p(n + 1);
  for (long long int i = 1; i <= n; ++i) {
    cin >> s[i];
  }
  for (long long int i = 1; i <= n; ++i) {
    cin >> p[i];
  }
  long long int cur = s[d] + p[1];
  vector<long long int> sf;
  for (long long int i = 1; i <= n; ++i)
    if (i != d) {
      if (s[i] <= cur) {
        sf.push_back(s[i]);
      }
    }
  multiset<long long int> st;
  for (long long int i = 2; i <= n; ++i) {
    st.insert(-p[i]);
  }
  long long int cnt = 0;
  for (long long int i = 0; i < (long long int)sf.size(); ++i) {
    auto it = st.lower_bound(-cur + sf[i]);
    if (it != st.end()) {
      ++cnt;
      st.erase(it);
    }
  }
  long long int ans = n - cnt;
  cout << ans << '\n';
}
