#!/usr/bin/env python # -*- coding: utf-8 -*- S = input() ans = -10**10 for i in range(len(S)): e = S[i+1:] + S[:i+1] if e[0] in ['+','-'] or e[-1] in ['+','-']: continue print('before :',e) e = ''.join([str(int(s)) if s.isdigit() is True else s for s in ''.join([' ' + x + ' ' if x in ['+','-'] else x for x in e]).split()]) print(e) ans = max(ans,eval(e)) print(ans)