def rpn(p)
  st = []
  while p.size > 0
    x = p.shift
    case x
    when "+" then st.push(st.pop+st.pop)
    when "-" then st.push(-st.pop+st.pop)
    when "*" then st.push(st.pop*st.pop)
    when "/" then st.push(1.0/st.pop*st.pop)
    else st << x.to_f end
  end
  return st
end

while gets
  ln = $_.split.map(&:to_s)
  puts rpn(ln)
end