def apply_operator(op, first, second):
   if op == '+':
      return first + second
   elif op == '-':
      return first - second
   elif op == '*':
      return first * second
   elif op == '/':
      return first / second
   else:
      print "Bad operator: " + op

while 1:
   line = raw_input()
   if not line:
      break
   stack = []
   tokens = line.rstrip().split(' ')
   for token in tokens:
      try:
         value = float(token)
         stack.append(value)
      except ValueError:
         second = stack.pop()
         first = stack.pop()
         stack.append(apply_operator(token, first, second))
   print stack[-1]

