S = input() + "*"
val = 0
cal = 0
nextv = 0
for s in S:
    if s == "*":
        if cal == 0:
            val += nextv
        else:
            val *= nextv
        nextv = 0
        cal = 0
    elif s == "+":
        if cal == 0:
            val += nextv
        else:
            val *= nextv
        nextv = 0
        cal = 1
    else:
        nextv *= 10
        nextv += int(s)
print(val)