#include <bits/stdc++.h>
using namespace std;
void qs(int *s_arr, int first, int last) {
  if (first < last) {
    int left = first, right = last, middle = s_arr[(left + right) / 2];
    do {
      while (s_arr[left] > middle) left++;
      while (s_arr[right] < middle) right--;
      if (left <= right) {
        int tmp = s_arr[left];
        s_arr[left] = s_arr[right];
        s_arr[right] = tmp;
        left++;
        right--;
      }
    } while (left <= right);
    qs(s_arr, first, right);
    qs(s_arr, left, last);
  }
}
int n;
int a[200001];
deque<int> b;
int f;
int main() {
  cin >> n;
  cin >> f;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    b.push_back(x);
  }
  a[f - 1] += b[0];
  int maxel = a[f - 1];
  b.pop_front();
  qs(a, 0, n - 1);
  int i = 0;
  bool flag = true;
  while (i < n && flag) {
    if (a[i] == maxel) {
      for (int j = i + 1; j < n; j++) {
        a[j] += b[b.size() - 1];
        b.pop_back();
      }
      flag = false;
    }
    i++;
  }
  qs(a, 0, n - 1);
  for (int j = 0; j < n; j++)
    if (a[j] == maxel) {
      cout << j + 1;
      break;
    }
  return 0;
}
