def judge(a, i, m, n, v, p):

    if i <= p: return True

    if a[i-1] + m < a[p-1]: return False

    check = (p + n - i)*m

    for j in range(p, i):

        check += a[i-1] + m - a[j-1]

    return check >= m*v



n, m, v, p = list(map(int, input().split()))

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



a.sort(reverse=True)

ng = n + 1

ok = 0



while (ng - ok) > 1:

    mid = (ok + ng) // 2

    if judge(a, mid, m, n, v, p):

        ok = mid

    else:

        ng = mid

print(ok)
def judge(a, acc, i, m, n, v, p):

    if i <= p: return True

    if a[i-1] + m < a[p-1]: return False

    check = (p + n - i)*m + (a[i-1] + m)*(i - p) - (acc[i-2] - acc[p-2])

    return check >= m*v



n, m, v, p = list(map(int, input().split()))

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



a.sort(reverse=True)

acc = [0] * (n+1)

for i in range(n):

    acc[i] = a[0] if i == 0 else a[i] + acc[i-1]

ng = n + 1

ok = 0



while (ng - ok) > 1:

    mid = (ok + ng) // 2

    if judge(a, acc, mid, m, n, v, p):

        ok = mid

    else:

        ng = mid

print(ok)
def judge(a, i, m, n, v, p):
    if i <= p:
        return True
    if a[i - 1] + m < a[p - 1]:
        return False
    check = (p + n - i) * m
    for j in range(p, i):
        check += a[i - 1] + m - a[j - 1]
    return check >= m * v


n, m, v, p = list(map(int, input().split()))
a = list(map(int, input().split()))
a.sort(reverse=True)
ng = n + 1
ok = 0
while (ng - ok) > 1:
    mid = (ok + ng) // 2
    if judge(a, mid, m, n, v, p):
        ok = mid
    else:
        ng = mid
print(ok)

def judge(a, acc, i, m, n, v, p):
    if i <= p:
        return True
    if a[i - 1] + m < a[p - 1]:
        return False
    check = (p + n - i) * m + (a[i - 1] + m) * (i - p) - (acc[i - 2] - acc[p - 2])
    return check >= m * v


n, m, v, p = list(map(int, input().split()))
a = list(map(int, input().split()))
a.sort(reverse=True)
acc = [0] * (n + 1)
for i in range(n):
    acc[i] = a[0] if i == 0 else a[i] + acc[i - 1]
ng = n + 1
ok = 0
while (ng - ok) > 1:
    mid = (ok + ng) // 2
    if judge(a, acc, mid, m, n, v, p):
        ok = mid
    else:
        ng = mid
print(ok)

-def judge(a, i, m, n, v, p): +def judge(a, acc, i, m, n, v, p): -    check = (p + n - i) * m -    for j in range(p, i): -        check += a[i - 1] + m - a[j - 1] +    check = (p + n - i) * m + (a[i - 1] + m) * (i - p) - (acc[i - 2] - acc[p - 2]) +acc = [0] * (n + 1) +for i in range(n): +    acc[i] = a[0] if i == 0 else a[i] + acc[i - 1] -    if judge(a, mid, m, n, v, p): +    if judge(a, acc, mid, m, n, v, p):