def calc_pws(str)
  arr = str.split(' ')
  stack = []
  arr.each do |cw|
    if cw =~ /[1-9]+/
      stack.push(cw.to_f)
    else
      b, a = stack.pop, stack.pop
      stack <<
        case cw
          when '+' then a+b
          when '-' then a-b
          when '*' then a*b
          when '/' then a/b
        end
    end
  end
  return stack.pop
end

while gets do
  str = $_
  puts sprintf('%.6f', calc_pws(str))
end