#include #include #include #include #include using namespace std; #define REP(i,first,last) for (int i=first;i y ? x : y) #define MIN(x,y) (x < y ? x : y) int main(){ int first_num; string str; cin >> first_num; cin >> str; char next_operator; int next_int; int result = first_num; stringstream ss(str); while (ss.peek() != -1) { ss >> next_operator; ss >> next_int; if (next_operator == '*') { result += next_int; } else { result *= next_int; } } cout << result << endl; }