#include "bits/stdc++.h" using namespace std; typedef long long ll; int main() { string s; cin >> s; vector S(111); int j=0; for (int i = 0; i < s.length(); i++) { if(s[i]=='+' || s[i]=='*') j++; else S[j].push_back(s[i]); } int ans= stoi(S[0]); j=1; for (int i = 0; i < s.length(); i++) { if (s[i] == '*') { ans += stoi(S[j++]); } else if (s[i] == '+') { ans *= stoi(S[j++]); } } cout << ans << endl; }