N,M,V,P = gets.split.map &:to_i
A = gets.split.map(&:to_i).sort!
h = Hash.new(0)
A.each {|i| h[i]+=1 }
K = h.keys
c = P
i = (K.size-1).downto(-1) {|i| 0<c && c-=h[K[i]] or break i+1}
X = K[i]-M
c = 0
i.downto(0) { |i|
  c += h[K[i]]  if K[i] <= X
}
p N-c