ope = {"+": lambda a, b: a + b, "-": lambda a, b: b - a, "*": lambda a, b: a * b, "/": lambda a, b: a / b}
stack =[]

for i in input().split():
    if i in ope:
        stack.append(ope[i](stack.pop(),stack.pop()))
    else:
        stack.append(int(i))

print(stack[0]) ope = {"+": lambda a, b: a + b, "-": lambda a, b: b - a, "*": lambda a, b: a * b, "/": lambda a, b: a / b} ope {"+": lambda a, b: a + b, "-": lambda a, b: b - a, "*": lambda a, b: a * b, "/": lambda a, b: a / b} "+" "+" lambda a, b: a + b a + b a b a b "-" "-" lambda a, b: b - a b - a b a a b "*" "*" lambda a, b: a * b a * b a b a b "/" "/" lambda a, b: a / b a / b a b a b stack =[] stack [] for i in input().split():
    if i in ope:
        stack.append(ope[i](stack.pop(),stack.pop()))
    else:
        stack.append(int(i)) i input().split() ().split () input split if i in ope:
        stack.append(ope[i](stack.pop(),stack.pop()))
    else:
        stack.append(int(i)) i in ope i ope stack.append(ope[i](stack.pop(),stack.pop())) stack.append stack append ope[i](stack.pop(),stack.pop()) [i] ope i stack.pop() stack.pop stack pop stack.pop() stack.pop stack pop stack.append(int(i)) stack.append stack append int(i) int i print(stack[0]) print stack[0] stack 0 stack =[] [] stack ope = {"+": lambda a, b: a + b, "-": lambda a, b: b - a, "*": lambda a, b: a * b, "/": lambda a, b: a / b} {"+": lambda a, b: a + b, "-": lambda a, b: b - a, "*": lambda a, b: a * b, "/": lambda a, b: a / b} ope
ope = {"+": lambda a, b: a + b, "-": lambda a, b: b - a, "*": lambda a, b: a * b, "/": lambda a, b: a / b}
stack =[]

for i in input().split():
    if i in ope:
        stack.append(ope[i](stack.pop(),stack.pop()))
    else:
        stack.append(int(i))

print(stack[0])