readlines.each do |l|
  s = []
  l.split.each do |i|
    if %w(+ - * /).include?(i)
      a,b = s.pop(2)
      s.push(a.send(i, b))
    else
      s.push(i.to_f)
    end
  end
  puts sprintf("%.6f", s.pop)
end