package main import ( "fmt" "strconv" ) func main() { var s, n string fmt.Scan(&s) sym := make([]int, 0) num := make([]int, 0) for i := 0; i < len(s); i++ { if s[i]<= '0' && s[i]<='9'{ n = n + string(s[i]) }else{ i, _ := strconv.Atoi(n) num = append(num, i) n = "" if s[i]=='*' { sym = append(sym, 1) }else if s[i]=='+'{ sym = append(sym, 2) } } } i, _ := strconv.Atoi(n) num = append(num, i) ans := num[0] for i := 0; i < len(sym); i++ { if (sym[i]==1){ ans += num[i+1] }else{ ans *= num[i+1] } } fmt.Println(ans) }