s=input() n=len(s) s=s+s a=-10**10 for i in range(n): if (s[i] not in "+-") and (s[i+n-1] not in "+-"): a=max(a,eval(s[i:i+n])) print(a)