exps = input().split('-')
nums = []

for exp in exps:
    nums.append(sum(list(map(int, exp.split('+')))))

answer = nums[0]

if len(nums) > 1:
    for i in range(1, len(nums)):
        answer -= nums[i]

print(answer)
