def w *s; s.each{|_| $stderr.puts _.inspect} end

N, M, V, P, *A = $<.read.split.map(&:to_i)
A.sort!
A.reverse!

if V <= P
	p(P+(A[P,N-P].index{|a| a+M<A[P-1] }||N-P))
else
	w 'P<V'
	B = A[P-1,N-P+1]
	Bsum = B.inject(M*(V-P+1),:+)
	Bavg = Bsum.to_f/B.size
	w B, Bsum, Bavg
	p(P-1+(B.index{|a| (a+M - (Bavg-(M-Bavg+a)/(N-P))).abs < Float::EPSILON }||B.size))
end
