operand = input().split()
stack = []
for op in operand:
    if op.isdigit():
        stack.append(op)
    else:
        val1 = stack.pop()
        val2 = stack.pop()
        stack.append(str(eval(val2 + op + val1)))
print (stack[0]) operand = input().split() operand input().split() ().split () input split stack = [] stack [] for op in operand:
    if op.isdigit():
        stack.append(op)
    else:
        val1 = stack.pop()
        val2 = stack.pop()
        stack.append(str(eval(val2 + op + val1))) op operand if op.isdigit():
        stack.append(op)
    else:
        val1 = stack.pop()
        val2 = stack.pop()
        stack.append(str(eval(val2 + op + val1))) op.isdigit() op.isdigit op isdigit stack.append(op) stack.append stack append op val1 = stack.pop() val1 stack.pop() stack.pop stack pop val2 = stack.pop() val2 stack.pop() stack.pop stack pop stack.append(str(eval(val2 + op + val1))) stack.append stack append str(eval(val2 + op + val1)) str eval(val2 + op + val1) eval val2 + op + val1 val2 + op val2 op val1 print (stack[0]) print stack[0] stack 0 val1 = stack.pop() stack.pop() val1 operand = input().split() input().split() operand val2 = stack.pop() stack.pop() val2 stack = [] [] stack
operand = input().split()
stack = []
for op in operand:
    if op.isdigit():
        stack.append(op)
    else:
        val1 = stack.pop()
        val2 = stack.pop()
        stack.append(str(eval(val2 + op + val1)))
print (stack[0])