#include <iostream>
#include <vector>

int main(){
    std::string input;
    std::vector<std::string> tokens;
    
    std::cin >> input;
    
    int prev = 0;
    while(1){
        int pos = input.find_first_of("+*", prev);
        if(pos == std::string::npos){
            tokens.push_back(input.substr(prev));
            break;
        }
        tokens.push_back(input.substr(prev, pos - prev));
        tokens.push_back(input.substr(pos, 1));
        prev = pos + 1;
    }
    
    int ans = std::stoi(tokens[0]);
    tokens.erase(tokens.begin());
    while(!tokens.empty()){
        char op = tokens[0][0];
        int operand = std::stoi(tokens[1]);
        switch(op){
            case '+':
                ans *= operand;
                break;
            case '*':
                ans += operand;
                break;
        }
        tokens.erase(tokens.begin(), tokens.begin()+2);
    }
    
    std::cout << ans << std::endl;
    
    return 0;
}