N, M, V, P = gets.split.map(&:to_i)
A = gets.split.map(&:to_i).sort.reverse
start, last = 0, A.size - 1
head = -1

while start <= last do
    x = (start + last) / 2
    
    if A[x] >= A[P - 1]
        head = x
        start = x + 1
        next
    elsif A[x] + M < A[P - 1]
        last = x - 1
        next
    end

    barriers = A[P - 1, x - (P - 1)]
    a_x = A[x] + M

    acceptable_vote_num = barriers.map { |a| a_x - a }.inject(:+)

    if M * (barriers.size - (N - V)) <= acceptable_vote_num
        head = x
        start = x + 1
    else
        last = x - 1
    end
end

p head + 1