n, m, v, p = gets.split.map(&:to_i);
a = gets.split.map(&:to_i).sort.reverse;
border = a[p - 1];
ans = p + a[p...n].each_with_index.count{|x, i|
	i += p
	if p - 1 + n - i < v
		vremain = (v - (p - 1 + n - i)) * m
		need = a[(p - 1)...i].map{|y| border - y}.sum
		if need < vremain
			vremain -= need
			border += vremain / (i - p + 1)
			border += (vremain % (i - p + 1) >= 1 ? 1 : 0)
		end
	end
	x + m >= border
}
puts ans