#include #include using namespace std; using lint=int64_t; string S; int cur; int expr(); int num(); int expr() { int ret=0; ret=num(); for(;;) { if(S[cur]=='+') { cur++; ret*=num(); } else if(S[cur]=='*') { cur++; ret+=num(); } else break; } return ret; } int num() { int ret=0; while('0'<=S[cur] && S[cur]<='9') { ret*=10; ret+=S[cur]-'0'; cur++; } return ret; } int main() { cin >> S; cout << expr() << endl; return 0; }