s = raw_input()
n = len(s)
ret = -1000000000000

f = True
if s[0] == '+' or s[0] == '-':
		f = False
for j in range(0,len(s)-1):
	if not s[j].isdigit() and not s[j+1].isdigit():
		f = False
if f:
	ret = eval(s)

for i in range(1,n):
	t = str(s[-i:] + s[:n-i])
	# print t
	if not t[0].isdigit() or  not t[-1].isdigit():
		continue
	f = True
	for j in range(0,len(t)-1):
		if not t[j].isdigit() and not t[j+1].isdigit():
			f = False
	if f:
		# print t
		ret = max(ret,eval(t))

print ret