s = input() res = eval(s) dg = "01234567889" for i in range(0, len(s) - 1): if s[i] not in dg or s[i + 1] not in dg: continue t = s[i + 1:len(s)] t += s[0:i + 1] res = max(res, eval(t)) print(res)