#include <bits/stdc++.h>
const long long int mod = pow(10, 9) + 7;
using namespace std;
int isPrime(int n) {
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) return 0;
  }
  return 1;
}
int main() {
  long long int n, d;
  cin >> n >> d;
  vector<int> v;
  vector<int> v1;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    v.push_back(x);
  }
  for (int i = 0; i < n; i++) {
    int y;
    cin >> y;
    v1.push_back(y);
  }
  vector<int> v2;
  int curr = v[d - 1] + v1[0];
  int flag = 0;
  int ind = -1;
  d = d - 1;
  for (int i = 0; i < n; i++) {
    if (v[i] <= curr && i != d) {
      if (flag == 0) {
        ind = i;
        flag = 1;
      }
      v2.push_back(v[i]);
    }
  }
  int pos = (n - v2.size());
  if (pos == n) {
    cout << pos;
    return 0;
  }
  int j = (n - 1);
  vector<int> v3;
  for (int i = ind; i < n; i++) {
    if (i != d) {
      v3.push_back(v[i] + v1[j]);
      j--;
    }
  }
  for (int k = 0; k < v3.size(); k++) {
    if (v3[k] > curr) pos++;
  }
  cout << pos;
  return 0;
}
