s = input() + '*' res = 0 num = 0 ns = '' op = '*' for c in s: if c == '*' or c == '+': if op == '*': res += num elif op == '+': res *= num ns = '' op = c else: ns += c num = int(ns) print(res)