import sys
def line():return sys.stdin.readline().strip()

ops = {"+":lambda a,b:b + a,
     "-":lambda a,b:b - a,
     "*":lambda a,b:b * a,
     "/":lambda a,b:b / a}
while True:
    try:
        stack = []
        for s in line().split():
            if s in ops:
                stack.append(ops[s](stack.pop(),stack.pop()))
            else:
                stack.append(int(s))
        print(stack[0])
    except:
        break