#include <bits/stdc++.h>
using namespace std;
long long int dp[100001], d[100001];
int main() {
  long long int n, r;
  cin >> n >> r;
  long long int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  multiset<long long int> second;
  long long int ele;
  cin >> ele;
  long long int curr = a[r - 1] + ele;
  for (int i = 0; i < n - 1; i++) {
    cin >> ele;
    second.insert(ele);
  }
  long long int ans = r;
  multiset<long long int>::iterator it, it2;
  for (int i = r - 2; i >= 0; i--) {
    if (a[i] > curr) {
      break;
    }
    long long int fin = curr - a[i];
    it = second.lower_bound(fin);
    if (it == second.end()) {
      it--;
    }
    if (*it > fin) {
      if (it == second.begin()) {
        break;
      }
      it2 = it;
      it--;
      second.erase(it, it2);
      ans--;
    } else if (*it == fin) {
      if (it == second.begin()) {
        it2 = it;
        it2++;
        second.erase(it, it2);
        ans--;
      } else {
        it2 = it;
        it--;
        second.erase(it, it2);
        ans--;
      }
    } else if (*it < fin) {
      it2 = it;
      it2++;
      second.erase(it, it2);
      ans--;
    }
  }
  cout << ans << endl;
}
