8 lines
193 B
Python
8 lines
193 B
Python
Str = input().split('-')
|
|
num = []
|
|
for s in Str:
|
|
total = 0
|
|
for n in map(int, s.split('+')):
|
|
total += n
|
|
num.append(total)
|
|
print(num[0] if len(num)==1 else num[0]-sum(num[1:])) |