S = input() S = S.replace("*", "-") S = S.replace("+", "*") S = S.replace("-", "+") while S.count("*") + S.count("+") > 0: if S.count("*") + S.count("+") == 1: print(eval(S)) exit() i = 1000 if "*" in S: i = min(i, S.index("*")) if "+" in S: i = min(i, S.index("+")) j = 1000 if "*" in S[i + 1:]: j = min(j, S[i + 1:].index("*")) if "+" in S[i + 1:]: j = min(j, S[i + 1:].index("+")) j += i + 1 S = str(eval(S[:j])) + S[j:]