N,M,V,P,*a = $<.readline("").split.map &:to_i
A = a.sort!.inject(Hash.new 0) {|h,i| h[i]+=1; h}.to_a
x,y = [a[-P]-M,a[-P]].map {|n| A.bsearch_index {|a| a[0]>=n} }
c = A[0...x].inject(0) {|s,a| s+a[1]}
v = V-P-c+1
A[y][1] = N-P-y
t = A[x][0]+M
w = A[x..y].inject(0) {|s,a| s + (t-a[0])*a[1]}
while M*v > w
  a,b = A[x,2]
  c += a[1]
  w += (b[0]-a[0])*(y-x)
  x += 1
end
p N-c