#!/usr/bin/env python3 s = list(input()) ans = 0 l, r = 0, 0 x, y = 0, 0 while l < len(s): while l < len(s) and s[l] != '*' and s[l] != '+': x *= 10 x += int(s[l]) l += 1 r = l + 1 while r < len(s) and s[r] != '*' and s[r] != '+': y *= 10 y += int(s[r]) r += 1 if s[l] == '*': ans = x + y else: ans = x * y x = ans y = 0 l = r print(ans)