str = gets.split
N,M,V,P = str[0].to_i, str[1].to_i, str[2].to_i, str[3].to_i
a = Array.new(N+1)
str = gets.split
for i in 0...N do
    a[i] = str[i].to_i
end
a[N] = 0
a.sort!.reverse!

if P >= V
    ok = a[P-1] - M
    i = P
    while ok <= a[i] && i < N
        i += 1
    end
    puts i
else
    minus = N-V
    ok = minus * M
    i = P
    x = 0
    while ok >= x && i <= N
        dif = a[i-1] - a[i]
        x += dif*(i-P+1)
        i += 1
    end
    i -= 1
    puts i
end