import sys
sys.stdin = open('1541_input.txt')

expression = input().split('-')
# print(expression)

partial_sum = []
for t in expression:
    temp = list(map(int, t.split('+')))
    partial_sum.append(sum(temp))

total = partial_sum[0]
for psum in partial_sum[1:]:
    total -= psum

print(total)
486e173dfbb61eaec54b2094630d1344d4c5039c
<mask token>

<mask token>
for t in expression:
    temp = list(map(int, t.split('+')))
    partial_sum.append(sum(temp))
<mask token>
for psum in partial_sum[1:]:
    total -= psum
print(total)

<mask token>
sys.stdin = open('1541_input.txt')
expression = input().split('-')
partial_sum = []
for t in expression:
    temp = list(map(int, t.split('+')))
    partial_sum.append(sum(temp))
total = partial_sum[0]
for psum in partial_sum[1:]:
    total -= psum
print(total)

import sys
sys.stdin = open('1541_input.txt')
expression = input().split('-')
partial_sum = []
for t in expression:
    temp = list(map(int, t.split('+')))
    partial_sum.append(sum(temp))
total = partial_sum[0]
for psum in partial_sum[1:]:
    total -= psum
print(total)

import sys
sys.stdin = open('1541_input.txt')

expression = input().split('-')
# print(expression)

partial_sum = []
for t in expression:
    temp = list(map(int, t.split('+')))
    partial_sum.append(sum(temp))

total = partial_sum[0]
for psum in partial_sum[1:]:
    total -= psum

print(total)