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...


-----Input-----

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.


-----Output-----

Reproduce the output of the reference solution, including the bug.


-----Examples-----
Input
8-7+6-5+4-3+2-1-0

Output
4

Input
2+2

Output
-46

Input
112-37

Output
375

Difficulty: VERY_HARD

Solutions:
s = input()
val = eval(s)
for i in range(len(s)):
	if s[i] == '+':
		j = i + 1
		c = -5
		while j < len(s) and s[j] != '+' and (s[j] != '-'):
			c *= 10
			j += 1
		val += c
	elif s[i] == '-':
		j = i + 1
		c = 3
		while j < len(s) and s[j] != '+' and (s[j] != '-'):
			c *= 10
			j += 1
		val += c
print(val)


import re
s = input()
print(eval(s) + eval(re.sub('-|\\+|\\d', lambda m: ['0', ['+3', '-5'][m[0] == '+']][m[0] in '+-'], s)))


s = input().strip() + '+'
ans = 0
curr = 0
sign = 1
for c in s:
	if c in '-+':
		ans += sign * curr
		curr = 0
	if c == '-':
		sign = -1
	elif c == '+':
		sign = 1
	curr = curr * 10 + (ord(c) - ord('0'))
print(ans)


from re import sub as b
print(eval(b('`', '-', b('(?P<a>-\\d*)', lambda x: b('-', '+3', x.group('a') * 3, 1), b('(?P<a>\\+\\d*)', lambda x: b('\\+', '`5', x.group('a') * 3, 1), input())))))


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)


s = input()
now = 0
n = len(s)
ans = []
while now < n and s[now] != '-' and (s[now] != '+'):
	ans.append(ord(s[now]) - 48)
	now += 1
ans.reverse()
while now < n:
	opt = s[now]
	now += 1
	a = [ord(opt) - 48]
	while now < n and s[now] != '-' and (s[now] != '+'):
		a.append(ord(s[now]) - 48)
		now += 1
	a.reverse()
	if len(a) <= len(ans):
		for i in range(len(ans) - len(a)):
			a.append(0)
	else:
		for i in range(len(a) - len(ans)):
			ans.append(0)
	for i in range(len(ans)):
		if opt == '-':
			ans[i] -= a[i]
		else:
			ans[i] += a[i]
ret = 0
ans.reverse()
for i in range(len(ans)):
	ret = ret * 10 + ans[i]
print(ret)


in_str = input().replace('-', ' - ').replace('+', ' + ').split()
res = int(in_str[0])
for i in range(1, len(in_str) - 1):
	if in_str[i] == '+':
		res += int(in_str[i + 1]) - 5 * 10 ** len(in_str[i + 1])
	elif in_str[i] == '-':
		res -= int(in_str[i + 1]) - 3 * 10 ** len(in_str[i + 1])
	else:
		pass
print(res)


ans = 0
op = 1
now = 0
s = input()
l = len(s)
for i in range(l):
	if s[i] == '+':
		ans = ans + op * now
		now = 0
		op = 1
	elif s[i] == '-':
		ans = ans + op * now
		now = 0
		op = -1
	now = now * 10 + ord(s[i]) - 48
ans = ans + op * now
print(ans)


import re
s = input()
print(eval(s) + eval(re.sub('\\d', '0', s).replace('-', '*3').replace('+', '-5').replace('*', '+')))


a = input()
(q, s) = ([0], 0)
z = []
for i in range(len(a)):
	y = a[i]
	if y == '+':
		z.append(1)
		q.append(0)
		s += 1
	elif y == '-':
		z.append(-1)
		q.append(0)
		s += 1
	q[s] = 10 * q[s] + (ord(y) - ord('0'))
otv = q[0]
for i in range(1, s + 1):
	otv += z[i - 1] * q[i]
print(otv)


s = [ord(c) - 48 for c in input()]
(r, t, f) = (0, 0, 1)
for x in s:
	if x < 0:
		r += f * t
		f = -4 - x
		t = 0
	t = t * 10 + x
print(r + f * t)


s = input()
ops = []
for i in range(0, len(s)):
	ch = s[i]
	if ch == '+' or ch == '-':
		ops.append(i)
ops.append(len(s))
for i in range(0, len(ops) - 1):
	ch = s[ops[i]]
	if ch == '-':
		s += '+3'
	if ch == '+':
		s += '-5'
	for j in range(ops[i], ops[i + 1] - 1):
		s += '0'
print(eval(s))


import re
s = input()
print(eval(s) + eval(re.sub('-|\\+|\\d', lambda m: '+-035'[2 - '+--'.count(m[0])::3], s)))


res = 0
cur = 0
sign = +1
for c in input() + '+':
	if c in '+-':
		res += sign * cur
		cur = 0
	if c == '+':
		sign = +1
	if c == '-':
		sign = -1
	cur = cur * 10 + ord(c) - ord('0')
print(res)


def mp():
	return map(int, input().split())
s = input() + '+'
r = 0
a = 0
z = '+'
for i in s:
	if i in '+-':
		if z == '+':
			r += a
		else:
			r -= a
		z = i
		a = 0
	a *= 10
	a += ord(i) - ord('0')
print(r)


res = 0
val = 0
sub = False
for c in input() + '+':
	if c == '+' or c == '-':
		if sub:
			val *= -1
		res += val
		val = 0
		sub = c == '-'
	val *= 10
	val += ord(c) - ord('0')
print(res)


e = input()
nr = 0
nrs = []
signs = []
for c in e:
	if not c.isdigit():
		nrs += [nr]
		signs += [c]
		nr = 0
	nr = nr * 10 + ord(c) - ord('0')
nrs += [nr]
res = nrs[0]
for i in range(len(signs)):
	if signs[i] == '+':
		res += nrs[i + 1]
	else:
		res -= nrs[i + 1]
print(res)