One very experienced problem writer decided to prepare a problem for April Fools Day contest. The task was very simple - given an arithmetic expression, return the result of evaluating this expression. However, looks like there is a bug in the reference solution...
The only line of input data contains the arithmetic expression. The expression will contain between 2 and 10 operands, separated with arithmetic signs plus and/or minus. Each operand will be an integer between 0 and 255, inclusive.
none
8-7+6-5+4-3+2-1-0
4
2+2
-46
112-37
375
255+255+255+255+255+255+255+255+255+255
-42450
0-255-255-255-255-255-255-255-255-255
24705
0+0+0+0+0+0+0+0+0+0
-450
0-0-0-0-0-0-0-0-0-0
270
0+100+100+100+100+100+100+100+100+100
-44100
255-100-100-100-100-100-100-100-100-100
26355
45+5
0
23+6-9
0
123+234-56-78-90
-3967
97+67+12+9+42+45+13
-2265
9-109-22+23-87+27-40+10
2211
66-165-34+209+76
-2048
150+222-3-90-248-187+198
-3628
136+90-200+6-102
5380
255-12-34-56-69-78-90
1716
243-173+90-56+78-53+53-21
2561
131+49+249+71-251-61+159-111+51
-4913
5-9-1-3+6+4-7+8-2
1
101+200+195+231+107+222+146+254+160+209
-43175
240-120-234-156-207-189
14334
1-2+3-4+5-6
-13
9-8+7-6+5-4+3-2+1-0
-45
s = input()

a = 1
b = 0
res = 0
for c in s:
	if (c == '+'):
		res = res + a * b
		a = 1
		b = 0
	elif (c == '-'):
		res = res + a * b
		a = -1
		b = 0
	b = b * 10 + ord(c) - 48
res = res + a * b

print(res)