from collections import deque S = input() formula = deque(S) ans = [] for _ in range(len(S)): formula.rotate(1) s = ''.join(formula) if s[0] != '+' and s[0] != '-' and s[-1] != '+' and s[-1] != '-': num = '' f = [] for n in s: if n.isdigit(): num += n else: f.append(str(int(num))) f.append(n) num = '' f.append(str(int(num))) m = ''.join(f) ans.append(eval(m)) print(max(ans))