S = list(input()) op = "+-" ans = -1000000000000 for i in range(len(S)): if not (S[0] in op or S[-1] in op): ans = max(ans, eval("".join(S))) S = S[1:] + [S[0]] print(ans)