#include <bits/stdc++.h>
using namespace std;
long long check(long long x, long long y, long long n, long long m) {
  return (x >= 0 and x < n and y >= 0 and y < m) ? 1 : 0;
}
void solve(long long testcase) {
  long long n, curr;
  cin >> n >> curr;
  long long a[n], c[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 0; i < n; i++) cin >> c[i];
  curr--;
  if (curr == 0) {
    cout << 1 << endl;
    return;
  }
  long long points = c[0] + a[curr];
  long long count = 0;
  long long lol = 1;
  for (long long i = curr - 1; i >= 0 and lol < n; i--) {
    while (a[i] + c[lol] > points and lol < n) {
      lol++;
    }
    if (a[i] + c[lol] <= points) {
      count++;
      lol++;
    }
  }
  cout << curr - count + 1 << endl;
  return;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  for (long long i = 1; i <= t; i++) {
    solve(i);
  }
  return 0;
}
