N,M,V,P = gets.split.map &:to_i
A = gets.split.map{|s| s.to_i}.sort!
X = A[-P]-M
K = []
A.inject(-1) {|l,n| K<<[n,0] if l<n; K[-1][1]+=1; n}
i = K.bsearch_index {|k| k[0]>=X}
p N - K[0...i].inject(0) {|s,k| s+k[1]}