#include <bits/stdc++.h>
using namespace std;
const unsigned long long int N = 2e5 + 5, MOD = 1000000007;
int n, p[N], ans, d, sd, sp, pos;
vector<int> s;
int main() {
  scanf("%d%d", &n, &d);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &sp);
    if (i + 1 == d)
      sd = sp;
    else
      s.push_back(sp);
  }
  for (int i = 0; i < n; ++i) {
    scanf("%d", p + i);
  }
  sd += p[0];
  s.push_back(sd);
  sort(s.begin(), s.end());
  reverse(s.begin(), s.end());
  for (int i = 0; i < n; ++i) {
    if (sd == s[i]) {
      pos = i;
      break;
    }
  }
  int c = n - 1;
  for (int i = pos + 1; i < n; ++i) {
    s[i] += p[c];
    c--;
  }
  sort(s.begin(), s.end());
  reverse(s.begin(), s.end());
  for (int i = 0; i < n; i++)
    if (sd == s[i]) {
      ans = i + 1;
      break;
    }
  printf("%d", ans);
  return 0;
}
