import sys for a in sys.argv[1:]: s=[0] for i in a.split():a=s.pop();s+=[str(int(eval(s.pop()+i+a)))]if i in"+-*/"else[a,i] print(s[1])