N,M,V,P=gets.split.map(&:to_i)
as=gets.split.map(&:to_i)
as.sort!
as.reverse!
l=0
r=N-1
while true
    border=(l+r)/2
    add=as[border]+M
    rank=as.bsearch_index{|e|e<=add}
    if rank.nil? || P-1<rank
        ok=false
    elsif V-1-rank<=0
        ok=true
    else #V-1-rank>0 自分より下位に点数を入れる
        rest=M*(V-1-rank) # うまく使う
        attack=P-rank-1
        (N-rank).times do |i|
            j=rank+i
            if border==j
                next
            elsif attack>0
                rest-=M
                attack-=1 if as[j]+M>add
            else
                rest-=[add-as[j],M].min
            end
        end
        ok=true if rest<=0
        ok=false if rest>0
    end
    
    if ok
        l=border
    else
        r=border
    end
    break if r-l<=1 
end

border=r
add=as[border]+M
rank=as.bsearch_index{|e|e<=add}
if rank.nil? || P-1<rank
    ok=false
elsif V-1-rank<=0
    ok=true
else #V-1-rank>0 自分より下位に点数を入れる
    rest=M*(V-1-rank) # うまく使う
    attack=P-rank-1
    (N-rank).times do |i|
        j=rank+i
        if border==j
            next
        elsif attack>0
            rest-=M
            attack-=1 if as[j]+M>add
        else
            rest-=[add-as[j],M].min
        end
    end
    ok=true if rest<=0
    ok=false if rest>0
end

idx=ok ? r : l
ans=0
N.times do |i|
    ans+=1 if as[i]>=as[idx]
end
puts ans
