f='*' x=y=0 for c in input()+'.': if c>'.': x=x*10+int(c) elif f=='*': y, x, f = y+x, 0, c elif f=='+': y, x, f = y*x, 0, c else: break print(y)