#include <bits/stdc++.h>
using namespace std;
int a[200005] = {0}, b[200005] = {0}, batas, r1, ans = 0, n, d;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> d;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> b[i];
  sort(b, b + n);
  batas = a[d] + b[n - 1];
  r1 = n - 2;
  for (int i = n; i >= 1; i--) {
    if (i != d) {
      int l = 0, mid, r = r1, save = -1;
      while (l <= r) {
        mid = (l + r) / 2;
        if (a[i] + b[mid] <= batas) {
          save = mid;
          l = mid + 1;
        } else
          r = mid - 1;
      }
      if (save == -1)
        break;
      else {
        ++ans;
        r1 = save - 1;
      }
    }
  }
  cout << n - ans << "\n";
}
