S = raw_input() def calc(ans, temp, next): if next == "+": ans += int(temp) elif next == "*": ans *= int(temp) return ans ans = 0 temp = "" next = "+" for s in S: if s != "*" and s != "+": temp += s elif s == "*": ans = calc(ans, temp, next) temp = "" next = "+" elif s == "+": ans = calc(ans, temp, next) temp = "" next = "*" ans = calc(ans, temp, next) print ans