def myeval(S): op = "" num = "" res = 0 for c in S: if c != "+" and c != "*": num += c else: if op == "": res = int(num) else: if op == "+": res += int(num) else: res *= int(num) num = "" op = c if op == "+": res += int(num) else: res *= int(num) return res S = input().rstrip() S = S.replace("*", "%") S = S.replace("+", "*") S = S.replace("%", "+") print(myeval(S))