#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b;
  int n[a + 2], m[a + 2];
  for (int i = 1; i <= a; i++) cin >> n[i];
  for (int i = 1; i <= a; i++) cin >> m[i];
  int ans = n[b];
  ans += m[1];
  int j = a;
  int big = 0;
  for (int i = 1; i < b; i++) {
    if (n[i] + m[j] > ans) {
      big++;
    } else
      --j;
  }
  cout << big + 1 << endl;
}
