#include #include #include int main(){ std::string s; std::cin >> s; int n = 0; int sum = 0; for(auto const c : s){ if( c >= '0' && c <= '9'){ n *= 10; n += std::stoi(std::string(1, c)); } else{ if(c=='+'){ sum += n; } else if(c=='-'){ sum *= n; } n = 0; } } std::cout << sum << std::endl; }