#include #include #include using namespace std; int main(){ string s; cin>>s; string t; int ans=0; int temp=0; bool pm=true;//t->plus,f->multiply for(int i=0;i<(int)s.size();i++){ if(s[i]=='*'){ if(pm) ans+=temp; else ans*=temp; temp=0; pm=true; } else if(s[i]=='+'){ if(pm) ans+=temp; else ans*=temp; temp=0; pm=false; } else{ t=s[i]; temp=temp*10+atoi(t.c_str()); } } if(pm) ans+=temp; else ans*=temp; cout<