#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, d;
  cin >> n >> d;
  pair<long long, long long> s[n];
  deque<long long> p;
  long long ind, cnt = 1;
  for (long long i = 0; i < n; i++) {
    cin >> s[i].first;
    s[i].second = i;
  }
  for (long long i = 0; i < n; i++) {
    long long tmp;
    cin >> tmp;
    p.push_back(tmp);
  }
  s[d - 1].first += p[0];
  long long num = s[d - 1].first;
  p.pop_front();
  for (long long i = 0; i < n; i++) {
    if (s[i].second != d - 1 && s[i].first + p[p.size() - 1] <= num) {
      s[i].first += p[p.size() - 1];
      p.pop_back();
    } else if (s[i].second != d - 1) {
      s[i].first += p[0];
      p.pop_front();
    }
  }
  sort(s, s + n);
  for (long long i = n - 1; s[i].second != d - 1; i--) {
    if (s[i].first != num) {
      cnt++;
    }
  }
  cout << cnt;
}
