#include "bits/stdc++.h" using namespace std; int ans, temp, op; void calc(){ if (op) ans *= temp; else ans += temp; temp = 0; } int main() { string S; cin >> S; for (int i = 0; i < S.size(); i++) { if (S[i] == '*'){ calc(); op = 0; } else if (S[i] == '+'){ calc(); op = 1; } else{ temp *= 10; temp += S[i] - '0'; } } calc(); cout << ans << endl; }