#include <bits/stdc++.h>
using namespace std;
template <typename T>
T next_int() {
  T x = 0, p = 1;
  char ch;
  do {
    ch = getchar();
  } while (ch <= ' ');
  if (ch == '-') {
    p = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + (ch - '0');
    ch = getchar();
  }
  return p * x;
}
const int max_int = (int)1e9 + 227 + 1;
const int max_n = (int)1e6 + 227 + 1;
const int mod = (int)1e9 + 7;
struct BOR {
  int link[2];
  long long sum;
  int k;
} new_bor;
vector<BOR> t;
void add(int a) {
  int p = 0;
  t[p].k += ((a > 0) ? 1 : -1);
  t[p].sum += a;
  int b = max(a, -a);
  for (int i = 29; i >= 0; i--) {
    bool bit = (1 << i) & b;
    if (t[p].link[bit] == 0) {
      t[p].link[bit] = t.size();
      t.push_back(new_bor);
    }
    p = t[p].link[bit];
    t[p].k += ((a > 0) ? 1 : -1);
    t[p].sum += a;
  }
}
int get(long long a) {
  int p = 0;
  if (t[p].sum < a) return max_int;
  if (a < 0) return 0;
  int ans = 0;
  long long e = 0;
  for (int i = 29; i >= 0; i--) {
    if (t[p].link[0] == 0) {
      t[p].link[0] = t.size();
      t.push_back(new_bor);
    }
    if (t[p].link[1] == 0) {
      t[p].link[1] = t.size();
      t.push_back(new_bor);
    }
    if (t[t[p].link[1]].sum < a) {
      a -= t[t[p].link[1]].sum;
      ans += t[t[p].link[1]].k;
      p = t[p].link[0];
    } else {
      e += (1 << i);
      p = t[p].link[1];
    }
  }
  return ans + a / e + (bool)(a % e);
}
int main() {
  t.push_back(new_bor);
  int n = next_int<int>();
  int m = next_int<int>();
  long long b = next_int<long long>();
  vector<long long> a(n);
  for (int i = 0; i < n; i++) {
    a[i] = next_int<long long>();
    if (i + 1 < n) add(a[i]);
  }
  for (int i = 0; i + 1 < n; i++) {
    add(-a[i]);
    int ans = get(b - a[i] + 1);
    if (ans < m) {
      cout << i + 1 << "\n";
      return 0;
    }
    add(a[i]);
  }
  cout << n << "\n";
}
