n0,m0,v0,p0,*a0=$<.read.split.map &:to_i
as=a0.sort_by{|e|-e}
th=as[p0-1]
a1=as.drop(p0).map{|e| th-e }
v1=[v0-p0,0].max
n1=n0-p0
ans=p0
tsum=0
#p [a1,v1,n1,ans]
a1.each_with_index{|e,i|
  break if e>m0
  ans+=1 if i<n1-v1 || (m0-e)*i+tsum >= (v1-(n1-i-1))*m0
  tsum+=e
}
p ans