#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 18;
int n, pos;
long long A[N];
long long B[N];
vector<long long> Va, Vb;
long long point;
int Rank;
void Input() {
  cin >> n >> pos;
  for (int i = 1; i <= n; i++) cin >> A[i];
  for (int i = 1; i <= n; i++) cin >> B[i];
}
void Output() {
  point = A[pos] + B[1];
  Rank = 1;
  Va.push_back(0);
  Vb.push_back(1);
  for (int i = 1; i <= n; i++) {
    if (i != pos) Va.push_back(A[i]);
    if (i != 1) Vb.push_back(B[i]);
  }
  vector<long long> xs, dh;
  int id = 0;
  for (int i = 1; i < Va.size(); i++) {
    if (Va[i] > point) {
      id = i;
      Rank++;
    }
  }
  for (int i = id + 1; i < Va.size(); i++) {
    long long x = Va[i];
    long long y = Vb[i];
    xs.push_back(x);
    dh.push_back(y);
  }
  sort(dh.begin(), dh.end());
  for (int it = 0; it < xs.size(); it++) {
    long long val = xs[it] + dh[it];
    if (val > point) Rank++;
  }
  cout << Rank;
}
int main() {
  ios ::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  Input();
  Output();
  return 0;
}
