2025-07-21 22:27:18 +09:00

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:]))