from operator import add, mul S = input() AB = [-1, -1] i = 0 op = None for c in S: if c in ('*', '+'): if AB[1] != -1: AB[0], AB[1] = op(*AB), -1 op = add if c == '*' else mul i = 1 else: AB[i] = (0 if AB[i]==-1 else AB[i] * 10) + int(c) AB[0] = op(*AB) print(AB[0])