S = input() num = -1 ns = [] ope = "" for i in S: if i.isdigit(): ns.append(i) else: if num != -1 and ope == "*": num = num + int("".join(ns)) elif num != -1 and ope == "+": num = num * int("".join(ns)) else: num = int("".join(ns)) ns = [] ope = i if ope == "*": num = num + int("".join(ns)) elif ope == "+": num = num * int("".join(ns)) print(num)