def f(x): x = x.replace('+', ' + ').replace('-', ' - ') L = [] for i in x.split(): if i in '+-': L += i else: L += str(int(i)) return ''.join(L) s = list(input()) L1 = [] for _ in range(len(s)): t = s.pop(0) s += t if s[0] not in '+-' and s[-1] not in '+-': L1 += [''.join(s)] L2 = [eval(f(i)) for i in L1] print(max(L2))