S=input() N=len(S) S="*"+S T=0 U="0" p=0 f=0 for s in S: if s=="*" or s=="+": f=1 else: U+=s if f: if p==0: T+=int(U) else: T*=int(U) U="" f=0 if s=="*":p=0 else: p=1 if p==0: T+=int(U) else: T*=int(U) print(T)