S = input() A = [] B = [] K = '' for c in S: if c != '*' and c != '+': K += c else: A.append(int(K)) if c == '*': B.append('+') else: B.append('*') K = '' A.append(int(K)) N = len(B) ans = A[0] for i in range(N): ans = eval(f'{ans}{B[i]}{A[i+1]}') print(ans)