sum = 1
$s = [0, 1]
(2..10000).each do |i|
  $s[i] = (sum += 1r / i)
end
def main(input = STDIN)
  while [0, 0, 0, 0] != (n, k, m, r = input.gets.split(" ").map(&:to_i))
    puts f(n, k, m, r)
  end
end
def f(n, k, m, r)
  return (1r / n * (1 + m * $s[n - 1])).to_f.round(r).to_s.ljust(r + 2, "0")
end
main