#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  cin >> n >> k;
  long long before[n], after[n];
  for (int i = 0; i < n; ++i) cin >> before[i];
  for (int i = 0; i < n; ++i) cin >> after[i];
  long long current_score = before[k - 1] + after[0];
  int current_position = 1;
  long long m = n - 1;
  int l = 2;
  for (int i = 0; i < n; ++i) {
    if (before[i] + after[m] > current_score && i != k - 1) {
      current_position++;
    } else if (before[i] + after[m] <= current_score && i != k - 1) {
      m--;
    }
  }
  cout << current_position;
}
