출처 : https://www.acmicpc.net/problem/1541
55-35+22+11-14+22
----> 55-(35+22+11)-(14+22) == 55-(35+22+11+14+22)
앞의 수 - 뒤의 +로 묶인 수들의 합 (마이너스를 만날 때 가장 큰 수 빼기)
#import re
#a = re.split('[+-]', input())
a=input().split('-')
nums=[]
for i in a:
result=0
s = i.split('+')
for j in s:
result += int(j)
nums.append(result)
n = nums[0]
for i in range(1,len(nums)):
n -= nums[i]
print(n)