STDIN.each do |l|
  s = Array.new
  l.split(' ').each do |c|
    case c
    when '+','-','*','/'
      a, b = [s.pop, s.pop]
      s.push eval("#{b} #{c} #{a}")
    else
      s.push c.to_f
    end
  end
  puts "%.6f" % s[0]
end