#include <bits/stdc++.h>
using namespace std;
int n, k, a[100010], val[100010];
long long b;
int main() {
  scanf("%d%d%I64d", &n, &k, &b);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    val[i] = a[i];
  }
  sort(val + 1, val + n);
  long long sum = b;
  for (int i = n - 1; i >= n - k; i--) sum -= val[i];
  if (sum >= 0) {
    printf("%d", n);
  } else {
    int ans = -1;
    for (int i = 1; i <= n; i++) {
      if (a[i] >= val[n - k] || sum + val[n - k] - a[i] < 0) {
        ans = i;
        break;
      }
    }
    printf("%d", ans);
  }
  return 0;
}
