s = input() eval_list = [] for i in range(len(s)): s = s[-1] + s[:-1] if s[0] not in ["+","-"] and s[-1] not in ["+","-"]: eval_list.append(eval(s)) print(max(eval_list))