#include<stdio.h>

int main(){
    char stack[];
    int i, j, k = 0, l = 0, flag = 0;
    scanf("%s", stack);
    while(stack[n] != '\0'){
        n++;
    }
    for(i = 0; i < n; i++){//*42 +43 -45
        if(flag == 0){
            if(stack[i] == 43){
                for(j = k; j < i; j++){//from k to i
                    sum[l] += stack[j];
                }
                k = i + 1;
                l++;
                flag = 1;
            }
            else if(stack[i] == 45){
                sum[l] == stack[k];
                for(j = k + 1; j < i; j++){
                    sum[l] -= stack[j];
                }
                k = i + 1;
                l++;
                flag = 1;
            }
            else if(stack[i] == 42){
                for(j = k; j < i; j++){//from k to i
                    sum[l] *= stack[j];
                }
                k = i + 1;
                l++;
                flag = 1;
            }
            else{
                flag = 0;
            }
        }
        else{
            for(j = 0; j < l; j++){
                highsum[j] = sum[j];
            }
            if(stack[i] == 43){
                for(j = m; j < l; j++){//from k to i
                    sum[0] += highsum[j];
                }
                l = 0;
                flag = 1;
            }
            else if(stack[i] == 45){
                sum[l] == stack[k];
                for(j = k + 1; j < i; j++){
                    sum[l] -= stack[j];
                }
                k = i + 1;
                l++;
                flag = 1;
            }
            else if(stack[i] == 42){
                for(j = k; j < i; j++){//from k to i
                    sum[l] *= stack[j];
                }
                k = i + 1;
                l++;
                flag = 1;
            }
            else{
                flag = 0;
            }
        }
    }
}
