N,M,V,P=gets.split.map(&:to_i)
as=gets.split.map(&:to_i)
as.sort!
as.reverse!
l=0
r=N-1
last=false
idx=0
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
    idx=border if last
    break if last
    last=true if r-l<=1 
end
N.times do |i|
    ans+=1 if as[i]>=as[idx]
end
