import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;

void main() {
  int n, m, v, p;
  readf (" %d %d %d %d", &n, &m, &v, &p);
  auto a = new int[n];
  foreach (i; 0 .. n) readf (" %d", &a[i]);
  //+v
  sort!"a>b" (a);
  int res = p;
  auto s = new long[n+1];
  foreach (i; 0 .. n) {
    s[i+1] = s[i] + a[i];
  }
  foreach (i; p .. n) {
    int x = a[i] + m;
    if (x < a[p-1]) break;
    int q = (v - 1) - (p - 1);
    q -= (n - 1 - i);
    if (q <= 0) {
      res = i + 1;
      continue;
    }
    long e = (i - (p - 1)).to!long * x;
    e -= s[i] - s[p-1];
    //q - votes
    //m - judges
    //t <= x * q
    if (e >= m.to!long * q) {
      res = i + 1;
    }
  }
  writeln (res);
}

