command = raw_input().split(" ")
stack = []

for i in command:
    if i == "+":
        b = int(stack.pop())
        a = int(stack.pop())
        stack.append(a + b)
    elif i == "-":
        b = int(stack.pop())
        a = int(stack.pop())
        stack.append(a - b)
    elif i == "*":
        b = int(stack.pop())
        a = int(stack.pop())
        stack.append(a * b)
    elif i == "/":
        b = int(stack.pop())
        a = int(stack.pop())
        stack.append(a / b)
    else:
        stack.append(i)

print(stack.pop())
f3c26fe3655eb2f10b12006d475836fd5c5605a6
<mask token>

<mask token>
for i in command:
    if i == '+':
        b = int(stack.pop())
        a = int(stack.pop())
        stack.append(a + b)
    elif i == '-':
        b = int(stack.pop())
        a = int(stack.pop())
        stack.append(a - b)
    elif i == '*':
        b = int(stack.pop())
        a = int(stack.pop())
        stack.append(a * b)
    elif i == '/':
        b = int(stack.pop())
        a = int(stack.pop())
        stack.append(a / b)
    else:
        stack.append(i)
print(stack.pop())

command = raw_input().split(' ')
stack = []
for i in command:
    if i == '+':
        b = int(stack.pop())
        a = int(stack.pop())
        stack.append(a + b)
    elif i == '-':
        b = int(stack.pop())
        a = int(stack.pop())
        stack.append(a - b)
    elif i == '*':
        b = int(stack.pop())
        a = int(stack.pop())
        stack.append(a * b)
    elif i == '/':
        b = int(stack.pop())
        a = int(stack.pop())
        stack.append(a / b)
    else:
        stack.append(i)
print(stack.pop())

command = raw_input().split(" ")
stack = []

for i in command:
    if i == "+":
        b = int(stack.pop())
        a = int(stack.pop())
        stack.append(a + b)
    elif i == "-":
        b = int(stack.pop())
        a = int(stack.pop())
        stack.append(a - b)
    elif i == "*":
        b = int(stack.pop())
        a = int(stack.pop())
        stack.append(a * b)
    elif i == "/":
        b = int(stack.pop())
        a = int(stack.pop())
        stack.append(a / b)
    else:
        stack.append(i)

print(stack.pop())