#include <bits/stdc++.h>
using namespace std;
int dx[4] = {-1, 0, 0, 1};
int dy[4] = {0, -1, 1, 0};
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
bool substring(string a, string b) {
  if (a.size() < b.size()) return false;
  for (long long i = b.size() - 1, j = a.size() - 1; i >= 0; i--, j--) {
    if (b[i] != a[j]) return false;
  }
  return true;
}
int main() {
  long long n, d, x, w, y;
  cin >> n >> d;
  vector<long long> a, p;
  for (long long i = 0; i < n; i++) {
    cin >> y;
    if (i == d - 1) {
      x = y;
      continue;
    }
    a.push_back(y);
  }
  for (long long i = 0; i < n; i++) {
    cin >> y;
    if (i == 0) {
      x += y;
      continue;
    }
    p.push_back(y);
  }
  for (long long i = 0, j = a.size() - 1, k = 0; i < a.size(); i++) {
    if (a[i] + p[j] <= x) {
      a[i] = a[i] + p[j];
      j--;
    } else {
      a[i] = a[i] + p[k];
      k++;
    }
  }
  long long c = 0;
  for (long long i = 0; i < a.size(); i++) {
    if (a[i] > x) {
      c++;
    }
  }
  cout << ++c << endl;
}
