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 - (v - p + 1))].count{|x|x + m >= border} + a[(n - (v - p + 1))...n].each_with_index.count{|x, i|
	i += (n - (v - p + 1))
	bw = i - p + 1
	vremain = (v - (n - bw)) * m
	need = bw * border - a[(p - 1)...i].inject(:+)
	newborder = border
	if need < vremain
		vremain -= need
		newborder += vremain / (i - p + 1)
		newborder += (vremain % (i - p + 1) >= 1 ? 1 : 0)
	end
	if x + m >= newborder
		ans += 1
	end
}
puts ans
