s = input() temp = '' num = [] cal = [] for i in range(len(s)): if s[i] != '*' and s[i] != '+': temp += s[i] else: num.append(int(temp)) temp = '' if s[i] != '*': cal.append(0) else: cal.append(1) num.append(int(temp)) ans = num[0] cnt = 1 for i in range(len(cal)): if cal[i] == 1: ans += num[cnt] else: ans *= num[cnt] cnt += 1 print(ans)