s = input() import copy import re ss = [ s ] ans = [] for i in range(len(s)): ss.append( ss[-1][1:] + ss[-1][0] ) try: if ss[-1][0] not in ['+', '-'] and ss[-1][-1] not in ['+', '-']: ans.append( eval(ss[-1]) ) except:... print(max(ans))