#include #include #include int main(void){ int a,b,d; int total=0; int max=-1000000; char s[50]; char s1[50]= ""; std::string s2; int cnt=0; int c=0; std::cin>>s; for(int j=0; j='0'&& s1[c]<='9'){ s2+=s1[c]; c++; } c--; total=std::atoi(s2.c_str()); s2=""; for(int a=c; a='0'&& s1[a]<='9'){ s2+=s1[a]; a++; } d=std::atoi(s2.c_str()); s2=""; total+=d; a--; } else if(s1[a]=='-'){ a++; while(s1[a]>='0'&& s1[a]<='9'){ s2+=s1[a]; a++; } d=std::atoi(s2.c_str()); s2=""; total-=d; a--; } } max=std::max(max,total); } } } std::cout<