n,m,v,p,*a=list(map(int,open(0).read().split()))

a=sorted(a)[::-1]

ok=p-1

ng=n

while ng-ok>1:

  mid=(ok+ng)//2

  c=a[mid]+m

  s=f=0

  for t in a[p-1:mid]:

    if t>c:break

    s+=c-t

  else:f|=(p-1+n-mid)*m+s>=v*m

  if f:ok=mid

  else:ng=mid

print((ok+1))
n,m,v,p,*a=list(map(int,open(0).read().split()))

A=sorted(a)[-p::-1]

s=m*v-m*n

u=0

for a in A:

 if(A[0]-m)*u<=a*u>=s:s+=a;u+=1

print((p-1+u))
n, m, v, p, *a = list(map(int, open(0).read().split()))
a = sorted(a)[::-1]
ok = p - 1
ng = n
while ng - ok > 1:
    mid = (ok + ng) // 2
    c = a[mid] + m
    s = f = 0
    for t in a[p - 1 : mid]:
        if t > c:
            break
        s += c - t
    else:
        f |= (p - 1 + n - mid) * m + s >= v * m
    if f:
        ok = mid
    else:
        ng = mid
print((ok + 1))

n, m, v, p, *a = list(map(int, open(0).read().split()))
A = sorted(a)[-p::-1]
s = m * v - m * n
u = 0
for a in A:
    if (A[0] - m) * u <= a * u >= s:
        s += a
        u += 1
print((p - 1 + u))

-a = sorted(a)[::-1] -ok = p - 1 -ng = n -while ng - ok > 1: -    mid = (ok + ng) // 2 -    c = a[mid] + m -    s = f = 0 -    for t in a[p - 1 : mid]: -        if t > c: -            break -        s += c - t -    else: -        f |= (p - 1 + n - mid) * m + s >= v * m -    if f: -        ok = mid -    else: -        ng = mid -print((ok + 1)) +A = sorted(a)[-p::-1] +s = m * v - m * n +u = 0 +for a in A: +    if (A[0] - m) * u <= a * u >= s: +        s += a +        u += 1 +print((p - 1 + u))