until (n, k, m, r = gets.split.map(&:to_i)).all?(&:zero?)
  ans = 10**r / n
  ans += (1...n).inject(0){|sum, i| sum + 10**r/i} / n unless m.zero?
  s = ans.to_s
  s = "0" + s until r < s.size
  print s[0]
  print "."
  puts s[1...s.size]
end