def calc x, y, operand
  case operand
  when "+"
    x + y
  when  "-"
    x - y
  when "*"
    x * y
  when "/"
    x / y
  end
end

while input = $stdin.gets do
  stack = Array.new
  input.chomp.split(" ").each do |s|
    if s =~ (/[0-9]+/)
      s = s.to_f
      stack.push(s)
    else
      y = stack.pop
      x = stack.pop
      stack.push calc(x, y, s)
    end
  end

  printf "%.5f\n", stack[0]
end