S = input() N = len(S) ans = -10 ** 10 for i in range(N): x = 1 y = '' a = 0 for j in range(i + 1 - N, i + 1): if S[j] == '+': if y: a += x * int(y) x = 1 y = '' else: a = -10**10 break elif S[j] == '-': if y: a += x * int(y) x = -1 y = '' else: a = -10**10 break else: y += S[j] if y: a += x * int(y) ans = max(ans, a) print(ans)