import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines S = read().rstrip().decode() words = S.replace('*',' * ').replace('+', ' + ').split() nums = map(int, words[::2]) ops = words[1::2] x = next(nums) for op, y in zip(ops, nums): if op == '*': x += y else: x *= y print(x)