/* imports all std modules {{{*/
import
  std.algorithm,
  std.array,
  std.ascii,
  std.base64,
  std.bigint,
  std.bitmanip,
  std.compiler,
  std.complex,
  std.concurrency,
  std.container,
  std.conv,
  std.csv,
  std.datetime,
  std.demangle,
  std.encoding,
  std.exception,
  std.file,
  std.format,
  std.functional,
  std.getopt,
  std.json,
  std.math,
  std.mathspecial,
  std.meta,
  std.mmfile,
  std.net.curl,
  std.net.isemail,
  std.numeric,
  std.parallelism,
  std.path,
  std.process,
  std.random,
  std.range,
  std.regex,
  std.signals,
  std.socket,
  std.stdint,
  std.stdio,
  std.string,
  std.system,
  std.traits,
  std.typecons,
  std.uni,
  std.uri,
  std.utf,
  std.uuid,
  std.variant,
  std.zip,
  std.zlib;
/*}}}*/

/+---test
6 1 2 2
2 1 1 3 0 2
---+/
/+---test
6 1 5 2
2 1 1 3 0 2
---+/
/+---test
10 4 8 5
7 2 3 6 1 6 5 4 6 5
---+/

void main(string[] args) {
  long N, M, V, P;
  readf(" %d %d %d %d ", &N, &M, &V, &P);

  const A = readln.split.map!(to!long).array.sort!"a < b".array;
  auto Ar = A.array.assumeSorted!"a < b";

  auto sp = new long[](N);
  foreach (i; 1..N) {
    sp[i] = sp[i-1];
    if (A[i] != A[i-1]) {
      sp[i] += (A[i]-A[i-1])*i;
    }
  }

  long ans;

  auto spr = sp.assumeSorted;
  long preva = -1;
  foreach (i, a; A) {
    if (preva == a) continue;
    preva = a;

    const long leftcap = M*i;
    const long rempt   = M*(V-1) - leftcap;
    if (rempt <= 0) {
      if (Ar.upperBound(a+M).count() < P) {
        ans = N - i;
        break;
      }
    } else if (i+1 < N) {
      const long r        = N - Ar.upperBound(a+M).count() - 1;
      const long rcap     = sp[r] - sp[i+1] - (A[r]-a)*(i+1) + (M+a-A[r])*(r+i);
      const long remrempt = rempt - rcap;

      if (Ar.upperBound(a+M).count() < P) {
        if (remrempt > 0) {
          long splitcnt = remrempt/M;
          if (splitcnt*M != remrempt) ++splitcnt;
          if (splitcnt < P) {
            ans = N - i;
            break;
          }
        } else {
          ans = N - i;
          break;
        }
      }
    }
  }
  ans.writeln;
}
