s = list(input()) L = [] for _ in range(len(s)): t = s.pop(0) s += t if s[0] not in '+-' and s[-1] not in '+-': L += [''.join(s)] L1 = [eval(i) for i in L] print(max(L1))