N, M, V, P = list(map(int, input().split()))

A = list(map(int, input().split()))

A.sort(reverse=True)



def isOk(n):

    if n < P:

        return True

    b = A[n] + M



    cnt = (P - 1) * M + (N - n) * M

    for a in A[P - 1: n]:

        cnt += max(0, b - a)



    if b >= A[P - 1] and cnt >= V * M:

        return True

    return False



ok = -1

ng = N

while ng - ok > 1:

    mid = (ng + ok) // 2

    if isOk(mid):

        ok = mid

    else:

        ng = mid



print(ng)
N, M, V, P = list(map(int, input().split()))

A = list(map(int, input().split()))

A.sort(reverse=True)



def isOk(i):

    x = A[i] + M

    B = [x - a for a in A[max(0, P - 1): i]]



    if not B:

        return True

    cnt = sum(B) + (P - 1) * M + (N - i) * M

    return min(B) >= 0 and cnt >= M * V



ok = 0

ng = N

while ng - ok > 1:

    mid = (ok + ng) // 2

    if isOk(mid):

        ok = mid

    else:

        ng = mid

print(ng)

N, M, V, P = list(map(int, input().split()))
A = list(map(int, input().split()))
A.sort(reverse=True)


def isOk(n):
    if n < P:
        return True
    b = A[n] + M
    cnt = (P - 1) * M + (N - n) * M
    for a in A[P - 1 : n]:
        cnt += max(0, b - a)
    if b >= A[P - 1] and cnt >= V * M:
        return True
    return False


ok = -1
ng = N
while ng - ok > 1:
    mid = (ng + ok) // 2
    if isOk(mid):
        ok = mid
    else:
        ng = mid
print(ng)

N, M, V, P = list(map(int, input().split()))
A = list(map(int, input().split()))
A.sort(reverse=True)


def isOk(i):
    x = A[i] + M
    B = [x - a for a in A[max(0, P - 1) : i]]
    if not B:
        return True
    cnt = sum(B) + (P - 1) * M + (N - i) * M
    return min(B) >= 0 and cnt >= M * V


ok = 0
ng = N
while ng - ok > 1:
    mid = (ok + ng) // 2
    if isOk(mid):
        ok = mid
    else:
        ng = mid
print(ng)

-def isOk(n): -    if n < P: +def isOk(i): +    x = A[i] + M +    B = [x - a for a in A[max(0, P - 1) : i]] +    if not B: -    b = A[n] + M -    cnt = (P - 1) * M + (N - n) * M -    for a in A[P - 1 : n]: -        cnt += max(0, b - a) -    if b >= A[P - 1] and cnt >= V * M: -        return True -    return False +    cnt = sum(B) + (P - 1) * M + (N - i) * M +    return min(B) >= 0 and cnt >= M * V -ok = -1 +ok = 0 -    mid = (ng + ok) // 2 +    mid = (ok + ng) // 2