n, m, v, P = gets.chomp.split(' ').map(&:to_i)
a = gets.chomp.split(' ').map(&:to_i)
sorted = a.sort
line = sorted[-P] - m
if v-P <= 0
  puts a.find_all{|point| point >= line}.count
  exit
end

(P-1).times do |i|
  sorted[-1-i] += m
end

m.times do
  (v -P+1).times do |i|
    sorted[i] += 1
  end
  sorted.sort!
end

line =sorted.sort[-P] - m
puts a.find_all{|point| point >= line}.count