while s=gets
  a=s.chomp.split ' '
  ls = []
  for i in 0...a.length
    c = a[i]
    if c=="+" || c=="-" || c=="*" || c=="/"
      x=ls.pop
      y=ls.pop
      if c=="+"
        ls.push y+x
      elsif c=="-"
        ls.push y-x
      elsif c=="*"
        ls.push y*x
      elsif c=="/"
        ls.push y/x
      end
    else
      ls.push c.to_f
    end
  end
  puts sprintf("%.9f",ls[0])
end