s = input() ans = -10 ** 10 if s[0].isdigit() and s[-1].isdigit(): ans = eval(s) for i in range(len(s)): if i == 0: continue; if s[i-1].isdigit() and s[i].isdigit(): res = eval(s[i:]+s[:i]) if ans < res: ans = res; print(ans)