#include using namespace std; typedef long long ll; int main() { string s; cin >> s; int n = s.size(); int i = 0; int ans = 0; while (i < n && isdigit(s[i])) { ans *= 10; ans += s[i] - '0'; i++; } while (i < n) { int num = 0; if (s[i] == '*') { i++; while (i < n && isdigit(s[i])) { num *= 10; num += s[i] - '0'; i++; } ans += num; } else if (s[i] == '+') { i++; while (i < n && isdigit(s[i])) { num *= 10; num += s[i] - '0'; i++; } ans *= num; } } cout << ans << endl; return 0; }