x = input().split()
s = []
for i in x:
    try:
        i = int(i)
        s.append(i)
    except:
        s.append(eval('{b}{ope}{a}'.format(a=s.pop(), ope=i, b=s.pop())))
print(s[0]) x = input().split() x input().split() ().split () input split s = [] s [] for i in x:
    try:
        i = int(i)
        s.append(i)
    except:
        s.append(eval('{b}{ope}{a}'.format(a=s.pop(), ope=i, b=s.pop()))) i x try:
        i = int(i)
        s.append(i)
    except:
        s.append(eval('{b}{ope}{a}'.format(a=s.pop(), ope=i, b=s.pop()))) except:
        s.append(eval('{b}{ope}{a}'.format(a=s.pop(), ope=i, b=s.pop()))) s.append(eval('{b}{ope}{a}'.format(a=s.pop(), ope=i, b=s.pop()))) s.append s append eval('{b}{ope}{a}'.format(a=s.pop(), ope=i, b=s.pop())) eval '{b}{ope}{a}'.format(a=s.pop(), ope=i, b=s.pop()) '{b}{ope}{a}'.format '{b}{ope}{a}' format a=s.pop() a s.pop() s.pop s pop ope=i ope i b=s.pop() b s.pop() s.pop s pop i = int(i) i int(i) int i s.append(i) s.append s append i print(s[0]) print s[0] s 0 s = [] [] s x = input().split() input().split() x i = int(i) int(i) i
x = input().split()
s = []
for i in x:
    try:
        i = int(i)
        s.append(i)
    except:
        s.append(eval('{b}{ope}{a}'.format(a=s.pop(), ope=i, b=s.pop())))
print(s[0])
