#include using namespace std; typedef string::const_iterator state; typedef long long ll; ll number(state &s){ ll ret=0; while(isdigit(*s)){ ret*=10; ret+=*s-'0'; s++; } return ret; } ll expression(state &s){ ll ret=number(s); while(true){ if(*s=='+'){ s++; ret+=number(s); } else if(*s=='-'){ s++; ret-=number(s); } else break; } return ret; } ll solve(string str){ state b=str.begin(); return expression(b); } int main(){ string str; cin>>str; ll ma=0; for(int i=0;i