#include using namespace std; using lint = long long int; template using V = vector; template using VV = V< V >; template void assign(V& v, int n, const T& a = T()) { v.assign(n, a); } template void assign(V& v, int n, const Args&... args) { v.resize(n); for (auto&& e : v) assign(e, args...); } using Itr = string::const_iterator; int expr(Itr& itr); int num(Itr& itr); int expr(Itr& itr) { int res = num(itr); while (true) { if (*itr == '*') res += num(++itr); else if (*itr == '+') res *= num(++itr); else break; } return res; } int num(Itr& itr) { int res = 0; while (isdigit(*itr)) { res = res * 10 + *itr - '0'; ++itr; } return res; } int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); string s; cin >> s; Itr itr = cbegin(s); cout << expr(itr) << '\n'; }