# -*- coding: utf-8 -*-
"""
Created on Sun Aug 25 13:53:07 2019

@author: Kwon
"""

inputStr = input()

splitedByMinus = inputStr.split('-')
minValue = 0

for i in range(len(splitedByMinus)) :
    splitedByPlus = splitedByMinus[i].split('+')
    
    for j in range(len(splitedByPlus)) :
        if i == 0 :
            minValue += int(splitedByPlus[j])
        
        else :
            minValue -= int(splitedByPlus[j])
            
print(minValue)
6dd68463f9a462df4c1ba148dd870be100e41e7b
<mask token>

<mask token>
for i in range(len(splitedByMinus)):
    splitedByPlus = splitedByMinus[i].split('+')
    for j in range(len(splitedByPlus)):
        if i == 0:
            minValue += int(splitedByPlus[j])
        else:
            minValue -= int(splitedByPlus[j])
print(minValue)

<mask token>
inputStr = input()
splitedByMinus = inputStr.split('-')
minValue = 0
for i in range(len(splitedByMinus)):
    splitedByPlus = splitedByMinus[i].split('+')
    for j in range(len(splitedByPlus)):
        if i == 0:
            minValue += int(splitedByPlus[j])
        else:
            minValue -= int(splitedByPlus[j])
print(minValue)

# -*- coding: utf-8 -*-
"""
Created on Sun Aug 25 13:53:07 2019

@author: Kwon
"""

inputStr = input()

splitedByMinus = inputStr.split('-')
minValue = 0

for i in range(len(splitedByMinus)) :
    splitedByPlus = splitedByMinus[i].split('+')
    
    for j in range(len(splitedByPlus)) :
        if i == 0 :
            minValue += int(splitedByPlus[j])
        
        else :
            minValue -= int(splitedByPlus[j])
            
print(minValue)