The classic programming language of Bitland is Bit++. This language is so peculiar and complicated.

The language is that peculiar as it has exactly one variable, called x. Also, there are two operations:

  Operation ++ increases the value of variable x by 1.  Operation -- decreases the value of variable x by 1. 

A statement in language Bit++ is a sequence, consisting of exactly one operation and one variable x. The statement is written without spaces, that is, it can only contain characters "+", "-", "X". Executing a statement means applying the operation it contains.

A programme in Bit++ is a sequence of statements, each of them needs to be executed. Executing a programme means executing all the statements it contains.

You're given a programme in language Bit++. The initial value of x is 0. Execute the programme and find its final value (the value of the variable when this programme is executed).


-----Input-----

The first line contains a single integer n (1 ≤ n ≤ 150) — the number of statements in the programme.

Next n lines contain a statement each. Each statement contains exactly one operation (++ or --) and exactly one variable x (denoted as letter «X»). Thus, there are no empty statements. The operation and the variable can be written in any order.


-----Output-----

Print a single integer — the final value of x.


-----Examples-----
Input
1
++X

Output
1

Input
2
X++
--X

Output
0

Difficulty: EASY

Solutions:
t = int(input())
c = 0
for h in range(t):
	com = input()
	if '++' in com:
		c += 1
	if '--' in com:
		c -= 1
print(c)


n = int(input())
i = 0
x = 0
while i < n:
	string = input()
	if '++' in string:
		x += 1
	if '--' in string:
		x -= 1
	i += 1
print(x)


x = 0
for _ in range(int(input())):
	if '+' in input():
		x = x + 1
	else:
		x = x - 1
print(x)


x = 0
n = int(input())
for a in range(0, n):
	st = input()
	if '+' in st:
		x += 1
	if '-' in st:
		x -= 1
print(x)


num_line = int(input())
n = 1
x = 0
while n <= num_line:
	program = list(input())
	if program.count('+') >= 1:
		x = x + 1
	else:
		x = x - 1
	n = n + 1
print(x)


n = int(input())
x = 0
for i in range(n):
	ope = input()
	if '+' in ope:
		x += 1
	elif '-' in ope:
		x += -1
print(x)


times = int(input())
x = 0
for i in range(times):
	y = input()
	if y[:2] == '++' or y[1:] == '++':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
s = ''
for i in range(0, n):
	s += input()
print(s.count('++') - s.count('--'))


n = int(input())
i = 0
x = 0
while i < n:
	statement = input()
	if '+' in statement:
		x += 1
	else:
		x -= 1
	i += 1
print(x)


x = int(input())
count = 0
for i in range(x):
	y = input()
	if y == 'X++' or y == '++X':
		count = count + 1
	else:
		count = count - 1
print(count)


num = int(input().strip())
x = 0
for i in range(num):
	command = input().strip()
	for j in command:
		if j == '+':
			x += 1
			break
		elif j == '-':
			x -= 1
			break
print(x)


count1 = 0
count2 = 0
n = int(input())
for i in range(n):
	string = input()
	string = string.replace('++', '+')
	string = string.replace('--', '-')
	count1 = count1 + string.count('+')
	count2 = count2 + string.count('-')
print(count1 - count2)


n = int(input())
x = 0
for i in range(0, n):
	statement = input()
	if statement[0] == '+' or statement[1] == '+':
		x = x + 1
	elif statement[0] == '-' or statement[1] == '-':
		x = x - 1
print(x)


from sys import stdin, stdout

def main():
	statements = int(stdin.readline())
	value = 0
	i = 0
	while i < statements:
		s = stdin.readline()
		if s[0] == '+' or s[2] == '+':
			value = value + 1
		else:
			value = value - 1
		i = i + 1
	print(value)
main()


x = 0

def operate(s):
	if '+' in s:
		return 1
	else:
		return -1
for i in range(int(input())):
	x = x + operate(input())
print(x)


n = int(input())
sum = 0
for i in range(0, n, 1):
	s = input()
	if s[0] == '-' or s[2] == '-':
		sum -= 1
	else:
		sum += 1
print(sum)


num_input = int(input())
x_value = 0
for i in range(num_input):
	statement = list(input())
	if '+' in statement:
		x_value += 1
	elif '-' in statement:
		x_value -= 1
print(x_value)


d = 0
n = int(input())
for i in range(n):
	s = input()
	f = list(s)
	if f[1] == '+':
		d += 1
	elif f[1] == '-':
		d -= 1
print(d)


n = int(input())
x = 0
for i in range(n):
	s = input()
	if s == '++X' or s == 'X++':
		x += 1
	else:
		s == '--X' or s == 'X--'
		x -= 1
print(x)


a = int(input().strip())
b = []
c = 0
for i in range(a):
	b.append(input().strip())
for i in b:
	if i == '++X' or i == 'X++':
		c += 1
	elif i == '--X' or i == 'X--':
		c -= 1
print(c)


n = int(input())
ans = 0
for i in range(n):
	st = input()
	if st == '++X' or st == 'X++':
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
count = 0
for i in range(1, n + 1):
	a = input()
	if '++' in a:
		count += 1
	elif '--' in a:
		count -= 1
print(count)


n = int(input())
x = 0
while n > 0:
	n -= 1
	line = input()
	for i in range(len(line)):
		if line[i] == 'X':
			continue
		if line[i] == '+':
			x += 1
			break
		if line[i] == '-':
			x -= 1
			break
print(x)


n = int(input())
x = 0
for _ in range(n):
	s = list(input().lower())
	s.remove('x')
	if s[0] == '+':
		x += 1
	elif s[0] == '-':
		x -= 1
print(x)


x = 0
n = int(input())
for i in range(n):
	a = input()
	if a[0] == '+' or a[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


nActions = int(input())
res = 0
for i in range(0, nActions):
	text = str(input()).replace('X', '')
	if text == '++':
		res += 1
	else:
		res -= 1
print(res)


n = int(input())
X = 0
for i in range(n):
	a = input()
	if a == 'X++' or a == '++X':
		X = X + 1
	elif a == 'X--' or a == '--X':
		X = X - 1
print(X)


n = int(input())
x = 0
for i in range(n):
	statement = input()
	if statement[1] == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


n = int(input())
x = 0
while n != 0:
	line = str(input())
	if line == 'X++':
		x += 1
	elif line == '++X':
		x += 1
	elif line == '+X+':
		x += 1
	else:
		x -= 1
	n -= 1
print(x)


x = 0
for _ in range(int(input())):
	s = input()
	if s == 'X++':
		x = x + 1
	if s == 'X--':
		x = x - 1
	if s == '++X':
		x = x + 1
	if s == '--X':
		x = x - 1
print(x)


n = int(input())
print(['+' in input() for i in range(n)].count(True) * 2 - n)


a = int(input())
x = 0
for i in range(a):
	s = input()
	if '++' in s:
		x += 1
	elif '--' in s:
		x -= 1
print(x)


n = int(input())
value = 0
for x in range(n):
	x = input()
	if x == '++X' or x == 'X++':
		value += 1
	if x == '--X' or x == 'X--':
		value -= 1
print(value)


i = 0
n = int(input())
x = 0
for x in range(n):
	X = input()
	if X[0] and X[1] == '+' or (X[1] and X[2] == '+'):
		i += 1
	else:
		i -= 1
print(i)


n = int(input())
s = 0
for i in range(n):
	t = str(input())
	if t == 'X--' or t == '--X':
		s = s - 1
	if t == 'X++' or t == '++X':
		s = s + 1
print(s)


n = int(input())
x = 0
for i in range(n):
	j = input()
	if j == '--X' or j == 'X--':
		x -= 1
	elif j == '++X' or j == 'X++':
		x += 1
print(x)


n = int(input())
res = 0
for i in range(n):
	res += input().count('+') - 1
print(res)


x = 0
t = int(input())
for i in range(t):
	s = input()
	if s[1] == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


s1 = 'X++'
s2 = '++X'
s3 = 'X--'
s4 = '--X'
c = 0
n = int(input())
L = []
for i in range(0, n):
	L.append(input())
for i in range(0, n):
	s = L[i]
	if s == s1 or s == s2:
		c += 1
	if s == s3 or s == s4:
		c -= 1
print(c)


masukan = input()
masukan = int(masukan)
masukan2 = []
x = 0
for i in range(0, masukan):
	masukans2 = input()
	masukan2 = masukan2 + [masukans2]
for i in masukan2:
	for j in i:
		if j == '+':
			x = x + 1
		elif j == '-':
			x = x - 1
if x != 0:
	x = x / 2
print(int(x))


increases = 0
decreases = 0
for _ in range(int(input())):
	s = input()
	if s == 'X++' or s == '++X':
		increases += 1
	elif s == '--X' or s == 'X--':
		decreases += 1
result = increases - decreases
print(result)


n = int(input())
x = 0
for i in range(n):
	temp = input()
	if '+' in temp:
		x = x + 1
	if '-' in temp:
		x = x - 1
print(x)


num = list(map(int, input().split()))[0]
words = [input().strip() for i in range(num)]
pos1 = words.count('X++')
pos2 = words.count('++X')
neg1 = words.count('--X')
neg2 = words.count('X--')
print(pos1 + pos2 - neg1 - neg2)


n = int(input())
x = 0
for _ in range(n):
	statement = input()
	if statement.count('+'):
		x += 1
	elif statement.count('-'):
		x -= 1
print(x)


x = 0
for i in range(int(input())):
	a = input()
	n = len(a)
	for i in range(n - 1):
		if a[i] == '+' and a[i + 1] == '+':
			x += 1
		elif a[i] == '-' and a[i + 1] == '-':
			x -= 1
print(x)


num = int(input())
input_list = []
i = 1
while i <= num:
	statement = input()
	i = i + 1
	input_list.append(statement)
count = 0
for i in range(num):
	if '++' in input_list[i]:
		count = count + 1
	elif '--' in input_list[i]:
		count = count - 1
print(count)


x = 0
for i in range(int(input())):
	str = input()
	if str == '++X' or str == 'X++':
		x = x + 1
	else:
		x = x - 1
print(x)


n = int(input())
x = 0
v = ''
for i in range(0, n, 1):
	line = input()
	if '++' in line:
		x += 1
	elif '--' in line:
		x -= 1
print(x)


def main():
	x = 0
	for _ in range(int(input().strip())):
		instruction = input().strip()
		if instruction[1] == '+':
			x += 1
		else:
			x -= 1
	print(x)
main()


x = 0
for i in range(int(input())):
	s = input()
	if s == '--X' or s == 'X--':
		x -= 1
	elif s == '++X' or s == 'X++':
		x += 1
print(x)


res = 0
for x in range(int(input())):
	t = input()
	if t == 'X++' or t == '++X':
		res += 1
	if t == 'X--' or t == '--X':
		res -= 1
print(res)


t = int(input())
c = 0
for i in range(t):
	s = input()
	if s == '++X' or s == 'X++':
		c = c + 1
	else:
		c = c - 1
print(c)


import sys
n = int(sys.stdin.readline().strip())
r = 0
for i in range(n):
	line = sys.stdin.readline().strip()
	if line[1] == '+':
		r += 1
	else:
		r -= 1
print(r)


x = int(input())
e = 0
for i in range(x):
	t = input()
	if t == '++X' or t == 'X++':
		e += 1
	else:
		e -= 1
print(e)


n = eval(input())
c = 0
x = '++'
y = '--'
for i in range(0, n):
	s = input()
	if x in s:
		c += 1
	else:
		c -= 1
print(c)


def find(t):
	x = 0
	for i in range(0, t):
		str = input()
		if str[0] == '+' or str[2] == '+':
			x = x + 1
		elif str[0] == '-' or str[2] == '-':
			x = x - 1
	print(x)
T = int(input())
find(T)


n = int(input())
count = 0
for i in range(0, n):
	count = (count - 1, count + 1)[input().__contains__('+')]
print(count)


time = int(input())
m = 0
for i in range(0, time):
	value = input()
	t = '+'
	if t in value:
		m += 1
	else:
		m -= 1
print(m)


x = 0
n = int(input())
for i in range(n):
	m = input()
	if m.find('+') > -1:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
f = 0
for x in range(n):
	a = input()
	if '++' in str(a):
		f += 1
	elif '--' in str(a):
		f -= 1
print(f)


t = int(input())
x = 0
while t > 0:
	s = input().strip()
	if s[:-1] == '++' or s[1:] == '++':
		x += 1
	elif s[:-1] == '--' or s[1:] == '--':
		x -= 1
	t -= 1
print(x)


n = int(input())
X = 0
for _ in range(n):
	instruction = input()
	if '++' in instruction:
		X += 1
	elif '--' in instruction:
		X -= 1
print(X)


ans = 0
for _ in range(int(input())):
	a = input()
	s = a.find('X')
	if s == 0:
		if a[1:] == '++':
			ans += 1
		else:
			ans -= 1
	elif a[:2] == '++':
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
a = 0
for i in range(0, n):
	s = input()
	if s.count('+') == 2:
		a += 1
	else:
		a -= 1
print(a)


a = int(input())
t = 0
while a > 0:
	a = a - 1
	v = input()
	if v == '++X' or v == 'X++':
		t = t + 1
	if v == '--X' or v == 'X--':
		t = t - 1
print(t)


def calValue(w, x):
	for i in range(len(w)):
		if w[i] == '+':
			x += 1
			break
		elif w[i] == '-':
			x -= 1
			break
	return x
t = int(input())
res = 0
for i in range(t):
	word = str(input())
	res = calValue(word, res)
print(res)


n = int(input())
p = 0
neg = 0
for i in range(n):
	s = input()
	if '+' in s:
		p = p + 1
	else:
		neg = neg - 1
print(p + neg)


n = int(input())
z = 0
for x in range(0, n):
	m = input()
	z += 1 if m.count('+') else 0
	z -= 1 if m.count('-') else 0
print(z)


n = int(input())
x = 0
for i in range(n):
	op = input()
	if op == '--X' or op == 'X--':
		x = x - 1
	if op == '++X' or op == 'X++':
		x = x + 1
print(x)


t = int(input())
v = 0
for i in range(t):
	s = input()
	if s[1] == '+':
		v += 1
	elif s[1] == '-':
		v -= 1
print(v)


n = int(input())
x = 0
for e in range(n):
	s = input()
	if s[0] == '+' or s[-1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for i in range(n):
	stmt = input()
	if stmt.find('++') > -1:
		x += 1
	elif stmt.find('--') > -1:
		x -= 1
print(x)


print(sum(('+' in input() or -1 for _ in range(int(input())))))


n = int(input())
x = 0
if 1 <= n <= 150:
	for i in range(n):
		command = input()
		if command == '++X' or command == 'X++':
			x += 1
		elif command == '--X' or command == 'X--':
			x -= 1
	print(x)


n = int(input())
l = []
c = 0
for i in range(0, n):
	e = input()
	l.append(e)
for j in range(0, len(l)):
	if l[j] == '++X' or l[j] == 'X++':
		c += 1
	else:
		c -= 1
print(c)


n = int(input())
i = 0
x = 0
while n != i:
	X = input()
	if '+' in X:
		x += 1
	elif '-' in X:
		x -= 1
	i += 1
print(x)


n = int(input())
x = 0
for m in range(n):
	i = str(input())
	if i[2:] == '+':
		x = x + 1
	elif i[0:1] == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


print(sum((44 - ord(input()[1]) for k in [0] * int(input()))))


n = int(input())
x = 0
for i in range(0, n):
	a = input()
	for ch in a:
		if ch == '+':
			x = x + 1
			break
		elif ch == '-':
			x = x - 1
			break
print(x)


x = int(input())
w = range(1, x + 1)
z = 0
for number in w:
	y = input()
	if y[1] == '-':
		z -= 1
	elif y[1] == '+':
		z += 1
print(z)


n = int(input())
M = 0
i = 0
while i < n:
	string = input()
	Q = string.find('+')
	if int(Q) >= 0:
		M += 1
	else:
		M = M - 1
	i += 1
print(M)


total = 0
for _ in [0] * int(input()):
	total = total + (1 if '++' in input() else -1)
print(total)


def getXValue():
	n = int(input())
	instructionList = []
	X = 0
	for i in range(n):
		instructionList.append(input().upper())
	for instruction in instructionList:
		instruct = [chars for chars in instruction]
		for chars in instruct:
			if chars == '+':
				X += 1
				break
			elif chars == '-':
				X -= 1
				break
	return X
print(getXValue())


n = int(input())
x = 0
for _ in range(n):
	s = input()
	if '++' in s:
		x += 1
	elif '--' in s:
		x -= 1
print(x)


x = 0
num = int(input())
for i in range(num):
	predl = input()
	if '+' in predl:
		x += 1
	else:
		x -= 1
print(x)


(pl, mn) = '+ -'.split()

def cnt(v):
	x = 0
	for t in v:
		if pl in t:
			x += 1
		if mn in t:
			x -= 1
	return x
n = int(input())
v = []
for x in range(n):
	v.append(input())
print(cnt(v))


n = int(input())
x = 0
while n:
	s = input()
	if '++' in s:
		x += 1
	elif '--' in s:
		x -= 1
	n -= 1
print(x)


val = int(input())
x = 0
for i in range(val):
	s = input()
	if s.startswith('++') or s.endswith('++'):
		x += 1
	elif s.startswith('--') or s.endswith('--'):
		x -= 1
print(x)


x = 0
num = int(input())
arr = []
for _ in range(num):
	arr.append(input())
for i in arr:
	if i == '++X' or i == 'X++':
		x = x + 1
	elif i == '--X' or i == 'X--':
		x = x - 1
print(x)


j = 0
for i in range(int(input())):
	if input()[1] == '-':
		j = j - 1
	else:
		j = j + 1
print(j)


re = 0
for _ in range(int(input())):
	str = input()
	if str[0] == '+' or str[2] == '+':
		re += 1
	else:
		re -= 1
print(re)


n = int(input())
x = 0
for i in range(n):
	s = input()
	if (s[0] == '+') | (s[2] == '+'):
		x += 1
	else:
		x -= 1
print(x)


n = 0
m = int(input())
for i in range(m):
	t = input()
	if t[1] == '+':
		n += 1
	else:
		n -= 1
print(n)


from sys import stdin

def main():
	x = 0
	num = int(stdin.readline())
	for pos in range(0, num):
		raw = stdin.readline()
		raw = list(raw)
		raw.pop()
		raw = ''.join(raw)
		if raw == '++X' or raw == '++x' or raw == 'X++' or (raw == 'x++'):
			x = x + 1
		else:
			x = x - 1
	print(x)
main()


print(sum(([-1, 1]['+' in input()] for x in range(int(input())))))


n = int(input())
v = 0
for _ in range(n):
	c = input()
	if c == 'X++' or c == '++X':
		v = v + 1
	else:
		v = v - 1
print(v)


n = input()
x = 0
for i in range(int(n)):
	s = input()
	if not s[0] in ('x', 'X'):
		if s[0] == '+':
			x += 1
		elif s[0] == '-':
			x -= 1
	elif s[1] == '+':
		x += 1
	elif s[1] == '-':
		x -= 1
print(x)


class Solution282A:

	def __init__(self):
		self.operations = []
		self.result = ''

	def parse_input(self):
		numbers = int(input())
		for _ in range(numbers):
			self.operations.append(input())

	def solve(self):
		x = 0
		for operation in self.operations:
			if '++' in operation:
				x += 1
			else:
				x -= 1
		self.result = str(x)

	def get_result(self):
		return self.result
solution = Solution282A()
solution.parse_input()
solution.solve()
print(solution.get_result())


n = int(input())
x = 0
for i in range(n):
	l = input()
	if l.count('+') == 2:
		x += 1
	else:
		x -= 1
print(x)


x = 0
n = int(input())
for _ in range(n):
	op = input()
	for i in range(3):
		if '+' in op:
			x += 1
			break
		elif '-' in op:
			x -= 1
			break
print(x)


k = int(input())
l = 0
for i in range(k):
	m = input()
	if m.count('+') == 2:
		l = l + 1
	else:
		l = l - 1
print(l)


n = int(input())
rs = 0
for i in range(n):
	c = input()
	d = c.find('+')
	e = c.find('-')
	if d >= 0:
		rs += 1
	if e >= 0:
		rs -= 1
print(rs)


n = int(input())
k1 = 0
k2 = 0
for i in range(n):
	a = input()
	if a.find('++') != -1:
		k1 += 1
	elif a.find('--') != -1:
		k2 += 1
print(0 + k1 - k2)


x = 0
for _ in range(int(input())):
	op = list(input())
	if op.count('+') == 2:
		x += 1
	else:
		x -= 1
print(x)


x = 0
n = int(input())
while n > 0:
	s = input()
	if s.count('+') > 0:
		x += 1
	if s.count('-') > 0:
		x -= 1
	n -= 1
print(x)


def language(index):
	x_int = 0
	for n in range(index):
		statement = input()
		if statement == '++X' or statement == 'X++':
			x_int += 1
		elif statement == '--X' or statement == 'X--':
			x_int -= 1
	print(x_int)
index = int(input())
language(index)


x = 0
input_statements = int(input())
for i in range(input_statements):
	operation = input()
	if '+' in operation:
		x = x + 1
	else:
		x = x - 1
print(x)


n = int(input())
num = 0
for i in range(n):
	str = input()
	if str[1] == '+':
		num += 1
	else:
		num -= 1
print(num)


t = int(input())
x = 0
for _ in range(t):
	cmd = input()
	if cmd == 'X++' or cmd == '++X':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
count = 0
while n > 0:
	string = input()
	if string[1] == '+':
		count += 1
	else:
		count -= 1
	n -= 1
print(count)


x = 0
n = int(input())
l = []
for i in range(n):
	l.append(input())
plus = '++'
minus = '--'
for i in l:
	if plus in i:
		x = x + 1
	if minus in i:
		x = x - 1
print(x)


X = 0
p = int(input())
for i in range(p):
	f = input()
	if '++' in f:
		X += 1
	else:
		X -= 1
print(X)


a = int(input())
inputs = []
n = 0
while n < a:
	y = input()
	n += 1
	inputs.append(y)

def f(x, input):
	for i in input:
		if i == '--X' or i == 'X--' or i == '-X-':
			x -= 1
		elif i == '++X' or i == 'X++' or i == '+X+':
			x += 1
	return x
print(f(0, inputs))


def main():
	(n,) = get_ints()
	result = 0
	total = 0
	for x in range(n):
		(a, b, c) = input()
		if a == '+' and b == '+' or (b == '+' and c == '+'):
			result += 1
		else:
			result -= 1
	print(result)

def get_ints():
	return (int(x) for x in input().split(' '))
main()


numOps = int(input())
final = 0
for i in range(numOps):
	temp = input()
	if '+' in temp:
		final += 1
	else:
		final -= 1
print(final)


__author__ = 'Bian'
n = int(input())
x = 0
while n > 0:
	n -= 1
	inp = input()
	if inp == '++X' or inp == 'X++':
		x += 1
	if inp == '--X' or inp == 'X--':
		x -= 1
print(x)


n = int(input())
statements = [input() for i in range(n)]
result = 0
for statement in statements:
	if '++' in statement:
		result += 1
	elif '--' in statement:
		result -= 1
print(result)


n = int(input())
cnt = 0
for x in range(n):
	line = input()
	if line == '++X' or line == 'X++':
		cnt += 1
	else:
		cnt -= 1
print(cnt)


a = int(input())
b = 0
for i in range(a):
	x = str(input())
	if x[1] == '+':
		b = b + 1
	else:
		b = b - 1
print(b)


n = int(input())
cnt = 0
for i in range(n):
	s = input()
	if s[1] == '+':
		cnt = cnt + 1
	else:
		cnt = cnt - 1
print(cnt)


a = int(input())
num = 0
for x in range(0, a):
	c = input()
	if '++' in c:
		num += 1
	else:
		num -= 1
print(num)


n = int(input())
statement = [input() for _ in range(n)]
x = 0
for i in statement:
	if i == 'X++' or i == '++X':
		x += 1
	else:
		x -= 1
print(x)


a = 0
n = int(input())
for i in range(0, n):
	g = input()
	if g[0] == '+' or g[2] == '+':
		a += 1
	if g[0] == '-' or g[2] == '-':
		a -= 1
print(a)


def solve(statements):
	count = 0
	for line in statements:
		if '++' in line:
			count += 1
		elif '--' in line:
			count -= 1
	return count
n = int(input())
statements = []
while n > 0:
	statements.append(input())
	n -= 1
print(solve(statements))


n = int(input())
li = []
for x in range(n):
	inp = input()
	li.append(inp)
a = 0
for i in li:
	if i == '++X' or i == 'X++':
		a = a + 1
	elif i == '--X' or i == 'X--':
		a = a - 1
print(a)


count = 0
number = int(input())
for item in range(number):
	tmp = input()
	if '++' in tmp:
		count += 1
	else:
		count -= 1
print(count)


count = int(input())
x = 0
while count != 0:
	a = str(input())
	if '+' in a:
		x += 1
	elif '-' in a:
		x -= 1
	count -= 1
print(x)


c = 0
n = input()
for i in range(int(n)):
	if '+' in input():
		c += 1
	else:
		c -= 1
print(c)


n = int(input())
x = 0
while n:
	s = input()
	if s[0] == '+' or s[2] == '+':
		x = x + 1
	else:
		x = x - 1
	n = n - 1
print(x)


num = int(input())
count = 0
for _ in range(num):
	cmd = input()
	if cmd == 'X++' or cmd == '++X':
		count += 1
	if cmd == '--X' or cmd == 'X--':
		count -= 1
print(count)


n = int(input())
ans = 0
while n > 0:
	n -= 1
	t = input()
	if t[1] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
ans = 0
for i in range(n):
	s = input()
	if '-' in s:
		ans -= 1
	if '+' in s:
		ans += 1
print(ans)


n = int(input())
result = 0
for i in range(n):
	bit = input()
	if bit[1] == '+':
		result = result + 1
	else:
		result = result - 1
print(result)


res = 0
p = 1
n = int(input())
for i in range(n):
	s = input()
	if s[0] == 'X':
		if s[1] == '+':
			res += p
		elif s[1] == '-':
			res -= p
	elif s[2] == 'X':
		if s[1] == '+':
			res += p
		elif s[1] == '-':
			res -= p
print(res)


n = int(input())
i = 1
x = 0
while i <= n:
	s = str(input())
	if s == 'X++' or s == '++X':
		x += 1
	else:
		x -= 1
	i += 1
print(x)


n = int(input())
x = 0
for k in range(0, n):
	o = input()
	if '++' in o:
		x += 1
	else:
		x -= 1
print(x)


c = 0
for i in range(int(input())):
	b = input()
	if b == 'X++' or b == '++X':
		c += 1
	elif b == 'X--' or b == '--X':
		c -= 1
print(c)


def main():
	from sys import stdout
	n = int(input())
	add_list = ['++X', '+X+', 'X++']
	sub_list = ['--X', '-X-', 'X--']
	x = 0
	for i in range(n):
		inp = input()
		if inp in add_list:
			x += 1
		elif inp in sub_list:
			x -= 1
	stdout.write(str(x))
main()


a = int(input())
cek = 0
end = 0
while cek != a:
	b = input()
	if b[0] == '+' or b[1] == '+' or b[2] == '+':
		end += 1
	else:
		end -= 1
	cek += 1
print(end)


n = int(input())
t = 0
while n > 0:
	str = input()
	a = str.count('+')
	b = str.count('-')
	if a > 0:
		t = t + a / 2
	if b > 0:
		t = t - b / 2
	n = n - 1
print(int(t))


nums = int(input())
li = []
for i in range(nums):
	s = input()
	li.append(s)
x = 0
for j in li:
	if j[1] == '+':
		x += 1
	elif j[1] == '-':
		x -= 1
print(x)


n = int(input())
k = 0
for i in range(0, n):
	word = input()
	if word == 'X++' or word == '++X':
		k = k + 1
	else:
		k = k - 1
print(k)


n = int(input())
c = 0
for i in range(0, n):
	x = input()
	if x[0] == '+':
		c = c + 1
	elif x[0] == '-':
		c = c - 1
	elif x[2] == '+':
		c = c + 1
	elif x[2] == '-':
		c = c - 1
print(c)


X = 0
N = int(input())
for n in range(0, N):
	operation = input()
	if (operation[0] == '-') | (operation[2] == '-'):
		X = X - 1
	if (operation[0] == '+') | (operation[2] == '+'):
		X = X + 1
print(X)


n = int(input())
c = 0
while n > 0:
	n -= 1
	b = input()
	if str(b) == '++X' or str(b) == 'X++':
		c += 1
	elif str(b) == '--X' or str(b) == 'X--':
		c -= 1
print(c)


z = int(input())
c = 0
for i in range(0, z):
	a = input()
	if a == '++X' or a == 'X++':
		c += 1
	elif a == '--X' or a == 'X--':
		c -= 1
print(c)


x = int(input())
asn = 0
for i in range(x):
	m = input()
	if m[1] == '+':
		asn += 1
	else:
		asn -= 1
print(asn)


X = 0
for _ in range(int(input())):
	s = input()
	if s[0] == '+' or s[2] == '+':
		X += 1
	else:
		X -= 1
print(X)


def bit():
	n = int(input())
	a = []
	e = 0
	for i in range(0, n):
		a.append(input())
	for i in range(len(a)):
		if a[i] == 'X++' or a[i] == '++X':
			e = e + 1
		elif a[i] == 'X--' or a[i] == '--X':
			e = e - 1
	print(e)
	return e
bit()


def main():
	loop_count = int(input())
	output = 0
	while loop_count:
		loop_count -= 1
		line = input()
		if line == '++X' or line == 'X++':
			output += 1
		else:
			output -= 1
	print(output)
main()


from sys import stdin
A = int(stdin.readline())
sum = 0
for t in range(0, A):
	B = stdin.readline()
	if B[0] == '+' or (B[1] == '+' or B[2] == '+'):
		sum += 1
	else:
		sum -= 1
print(sum)


x = 0
for _ in range(int(input())):
	t = input()
	if '++' in t:
		x += 1
	if '--' in t:
		x -= 1
print(x)


n = int(input())
rez = 0
for i in range(n):
	oper = input()
	if '++' in oper:
		rez += 1
	elif '--' in oper:
		rez -= 1
print(rez)


def main():
	n = int(input())
	x_value = 0
	for i in range(n):
		x_string = input()
		if x_string.count('+') == 2:
			x_value += 1
		elif x_string.count('-') == 2:
			x_value -= 1
	return x_value
print(main())


a = int(input())
p = 0
for i in range(0, a):
	ai = input()
	if ai == '++X' or ai == 'X++':
		p = p + 1
	elif ai == '--X' or ai == 'X--':
		p = p - 1
print(p)


NT = int(input())
N = 1
x = 0
while N <= NT:
	N = N + 1
	str1 = input()
	if '+' in str1:
		x = x + 1
	else:
		x = x - 1
print(x)


n = int(input())
mylist = []
x = 0
for i in range(n):
	t = input()
	if '++' in t:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
a = []
for i in range(n):
	a.append(input())
print(a.count('X++') + a.count('++X') - a.count('X--') - a.count('--X'))


print(sum((44 - ord(input()[1]) for i in [0] * int(input()))))


count = int(input())
result = 0
result = [1 if input()[1] == '+' else -1 for _ in range(count)]
print(sum(result))


i = int(input())
x = 0
for j in range(i):
	s = input()
	if '++' in s:
		x += 1
	if '--' in s:
		x -= 1
print(str(x))


def solution(a):
	count = 0
	for i in range(0, len(a)):
		s = a[i]
		if '-' in s:
			count = count - 1
		elif '+' in s:
			count = count + 1
	return count

def main():
	n = int(input())
	a = []
	for i in range(0, n):
		s = input()
		a.append(s)
	ans = solution(a)
	print(ans)
main()


n = int(input())
x = 0
while n:
	if '++' in input():
		x += 1
	else:
		x -= 1
	n -= 1
print(x)


x = int(input())
count = 0
for i in range(x):
	T = input()
	if T[1] == '+':
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
ans = 0
count1 = 0
count2 = 0
for i in range(n):
	c = input()
	if c == 'X++' or c == '++X':
		count1 += 1
	else:
		count2 += 1
ans = count1 - count2
print(ans)


t = int(input())
x = 0
for i in range(t):
	k = input()
	if k == '++X' or k == 'X++':
		x += 1
	if k == '--X' or k == 'X--':
		x -= 1
print(x)


def main():
	n = int(input())
	x = 0
	for i in range(0, n):
		sentence = input()
		if '++' in sentence:
			x += 1
		else:
			x -= 1
	print(x)
main()


num = int(input())
x = 0
for _ in range(num):
	inp = list(input())
	if '-' in inp:
		x -= 1
	elif '+' in inp:
		x += 1
print(x)


n = int(input())
x_value = 0
for i in range(0, n):
	s = input()
	s = s.replace('X', '')
	if s == '++':
		x_value = x_value + 1
	else:
		x_value = x_value - 1
print(x_value)


n = int(input())
ans = 0
for i in range(n):
	inp = input()
	if '++' in inp:
		ans = ans + 1
	elif '--' in inp:
		ans = ans - 1
print(ans)


s = input()
s = int(s)
X = 0
while s > 0:
	op = input()
	if '++' in op:
		X += 1
	if '--' in op:
		X -= 1
	s -= 1
print(X)


M = 0
for i in range(int(input())):
	a = input()
	if a[0] == '+' or a[1] == '+':
		M = M + 1
	else:
		M = M - 1
print(M)


def parse_operations(array):
	x = 0
	for operation in array:
		if '++' in operation:
			x += 1
		else:
			x -= 1
	return x
n = int(input())
array_of_operations = []
for i in range(n):
	array_of_operations.append(input())
print(parse_operations(array_of_operations))


n = int(input())
num = 0
for _ in range(n):
	s = input()
	if s == '++X' or s == 'X++':
		num += 1
	else:
		num -= 1
print(num)


no_of_statement = int(input())
print(sum((1 if '++' in input() else -1 for _ in range(no_of_statement))))


n = int(input())
x = 0
intake = []
for i in range(n):
	intake.append(input().lower())
for j in intake:
	if j == '++x' or j == 'x++':
		x += 1
	elif j == '--x' or j == 'x--':
		x -= 1
print(x)


n = int(input())
a = '++'
b = '--'
total = 0
for i in range(n):
	m = input()
	if a in m:
		total += 1
	else:
		total -= 1
print(total)


x = 0
n = int(input())
for i in range(n):
	r = input()
	if r[0] == 'X':
		if r[1] == '+':
			x = x + 1
		else:
			x = x - 1
	if r[0] == '+':
		x = x + 1
	if r[0] == '-':
		x = x - 1
print(x)


n = int(input())
x = 0
for i in range(n):
	operation = str(input())
	if operation.find('+') != -1:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
counter = 0
for i in range(0, n):
	string = input('')
	if string.count('--') >= 1:
		counter -= 1
	elif string.count('++') >= 1:
		counter += 1
print(counter)


n = int(input())
x = 0
while n > 0:
	aux = input()
	if aux == '++X' or aux == 'X++' or aux == '++x' or (aux == 'x++'):
		x += 1
	else:
		x -= 1
	n -= 1
print(x)


x = 0
list1 = []
n = int(input())
for i in range(n):
	list1.append(input())
for i in range(len(list1)):
	if list1[i] == 'X++' or list1[i] == '++X':
		x = x + 1
	else:
		x = x - 1
print(x)


a = int(input())
x = 0
for i in range(a):
	q = input()
	if q == 'X++' or q == '++X':
		x = x + 1
	if q == '--X' or q == 'X--':
		x = x - 1
print(x)


t = int(input())
x = 0
for i in range(t):
	k = input()
	j = 0
	if len(k) == 1:
		print(0)
	else:
		while j < len(k):
			if k[j] == 'X':
				j = j + 1
			if k[j] == '+':
				j = j + 3
				x = x + 1
			if j >= len(k):
				break
			if k[j] == '-':
				j = j + 3
				x = x - 1
print(x)


x = 0
p = ['X++', '++X']
q = ['X--', '--X']
n = int(input())
for i in range(n):
	s = input()
	if s in p:
		x += 1
	elif s in q:
		x -= 1
print(x)


n = int(input())
print(sum([1 if '+' in e else -1 for e in [input() for i in range(n)]]))


__author__ = 'runekri3'
n = int(input())
operations = [input() for _ in range(n)]
res = 0
for op in operations:
	if '+' in op:
		res += 1
	else:
		res -= 1
print(res)


n = int(input())
ls = []
for i in range(1, n + 1):
	ls.append(input())
res = 0
for c in ls:
	if '++' in c:
		res += 1
	if '--' in c:
		res -= 1
print(res)


n = int(input())
sum = 0
for i in range(n):
	k = input()
	if '+' in k:
		sum += 1
	else:
		sum -= 1
print(sum)


n = int(input())
l = []
m = 0
if 1 <= n <= 150:
	for i in range(n):
		l.append(input())
	for i in range(n):
		if '++' in l[i]:
			m += 1
		elif '--' in l[i]:
			m -= 1
	print(m)


n = int(input())
k = 0
for i in range(n):
	s = input()
	if s == '++X' or s == 'X++':
		k += 1
	elif s == '--X' or s == 'X--':
		k -= 1
print(k)


ans = 0
for _ in range(int(input())):
	if '+' in list(input()):
		ans += 1
	else:
		ans -= 1
print(ans)


print(sum((1 if input().find('+') != -1 else -1 for i in range(int(input())))))


number_of_strings = int(input())
x = 0
for i in range(0, number_of_strings):
	comm = input()
	if comm[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


t = int(input())
res = 0
for _ in range(t):
	inp = input()
	if '++' in inp:
		res = res + 1
	elif '--' in inp:
		res = res - 1
	else:
		res = res
print(res)


t = int(input())
x = 0
while t:
	n = input()
	if n == 'X++':
		x = x + 1
	elif n == '++X':
		x = x + 1
	elif n == '--X':
		x = x - 1
	else:
		x = x - 1
	t -= 1
print(x)


no = int(input())
x = 0
for i in range(no):
	a = input()
	if '+' in a:
		x = x + 1
	else:
		x = x - 1
print(x)


l = []
t = 0
for i in range(int(input())):
	l.append(input())
for i in l:
	if i == 'X++' or i == '++X':
		t += 1
	else:
		t -= 1
print(t)


a = int(input())
x = 0
for i in range(a):
	b = list(input())
	if b[0] == 'X' and b[1] == '+' and (b[2] == '+') or (b[2] == 'X' and b[1] == '+' and (b[0] == '+')):
		x += 1
	else:
		x = x - 1
print(x)


number = int(input())
sum = 0
for _ in range(number):
	a = input()
	if a == 'X++' or a == '++X':
		sum += 1
	elif a == '--X' or a == 'X--':
		sum -= 1
print(sum)


x = 0
l = int(input())
for i in range(l):
	y = input()
	if y[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for e in range(n):
	op = input()
	if op == '++X' or op == 'X++':
		x += 1
	elif op == '--X' or op == 'X--':
		x -= 1
print(x)


from sys import stdin
input = stdin.readline

def bits(n):
	return sum((1 if input()[1] == '+' else -1 for _ in range(n)))
print(bits(int(input())))


n = int(input())
X = 0
for i in range(n):
	Str = str(input())
	if '+' in Str:
		X = X + 1
	else:
		X = X - 1
print(X)


n = int(input())
res = int(0)
for i in range(1, int(n) + 1):
	a = input()
	if a == '++X' or a == 'X++':
		res += 1
	else:
		res -= 1
print(res)


import re
pat1 = re.compile('X?\\+\\+X?')
pat2 = re.compile('X?\\- ?\\-X?')
x = 0
for _ in range(int(input())):
	statment = input()
	if pat1.match(statment):
		x += 1
	elif pat2.match(statment):
		x -= 1
print(x)


print(sum(((-1, 1)['+' in input()] for _ in [0] * int(input()))))


a = '++X'
b = 'X++'
c = '--X'
d = 'X--'
n = int(input())
x = int(0)
sum = int(0)
for i in range(0, n):
	p = input()
	if p == a or p == b:
		x += 1
	elif p == c or p == d:
		x -= 1
print(x)


n = int(input())
p = 0
m = 0
for i in range(n):
	g = input()
	p += g.count('++')
	m += g.count('--')
print(p - m)


n = int(input())
count = 0
for i in range(n):
	oper = input()
	if oper == '++X' or oper == 'X++':
		count += 1
	else:
		count -= 1
print(count)


number = int(input())
res = 0
for i in range(0, number):
	opr = input()
	if opr[1] == '+':
		res += 1
	else:
		res -= 1
print(res)


x = 0
for _ in range(int(input())):
	ins = input()
	if ins[0:2] == '++' or ins[1:] == '++':
		x += 1
	else:
		x -= 1
print(x)


t = int(input())
ans = 0
for _ in range(t):
	a = input()
	if a == '++X' or a == 'X++':
		ans += 1
	else:
		ans -= 1
print(ans)


a = int(input())
d = [input() for _ in range(a)]
c = 0
for i in d:
	if i.count('--') == 1:
		c -= 1
	else:
		c += 1
print(c)


n = int(input())
c = 0
for i in range(n):
	s = input()
	if '+' in s:
		c += 1
	elif '-' in s:
		c -= 1
print(c)


n = int(input())
value = 0
for _ in range(0, n):
	operation = input()
	if '+' in operation:
		value += 1
	else:
		value -= 1
print(value)


n = int(input())
X = 0
for i in range(0, n):
	if input().find('+') != -1:
		X += 1
	else:
		X -= 1
print(X)


N = int(input())
count = 0
while N:
	N -= 1
	S = input()
	if '++' in S:
		count += 1
	elif '--' in S:
		count -= 1
print(count)


amount_of_sentences = int(input())

def sentence_processor(counter, sentence):
	if sentence == '++X' or sentence == 'X++':
		counter += 1
	elif sentence == '--X' or sentence == 'X--':
		counter -= 1
	return counter
i = 0
counter = 0
sentence = ''
while i < amount_of_sentences:
	sentence = input()
	counter = sentence_processor(counter, sentence)
	i += 1
print(counter)


x = 0
for i in range(int(input())):
	o = input()
	if '++' in o:
		x += 1
	else:
		x -= 1
print(x)


l = 0
for a in range(int(input())):
	b = input()
	if '+' in b:
		l = l + 1
	else:
		l = l - 1
print(l)


import sys, math
count = input()
x = 0
for a in range(int(count)):
	i = input()
	for k in range(len(i)):
		if i[k] == '-':
			x = x - 1
			break
		elif i[k] == '+':
			x = x + 1
			break
print(x)


def compile(exps):
	result = 0
	for exp in exps:
		if exp.startswith('X'):
			if exp.endswith('+'):
				result += 1
				continue
			result -= 1
			continue
		elif exp.startswith('+'):
			result += 1
			continue
		result -= 1
	return result
n = int(input())
exps = []
for i in range(n):
	exps.append(input())
print(compile(exps))


n = int(input())
cont = 0
for i in range(n):
	neg = input()
	if '+' in neg:
		cont += 1
	if '-' in neg:
		cont -= 1
print(cont)


n = int(input())
t = 0
while n:
	s = input()
	if s == 'X++' or s == '++X':
		t += 1
	elif s == 'X--' or s == '--X':
		t -= 1
	n -= 1
print(t)


n = int(input())
ac = []
for i in range(n):
	line = input()
	ac.append(line[1])
num = 0
for i in range(n):
	if ac[i] == '+':
		num = num + 1
	else:
		num = num - 1
print(num)


s = int(input())
res = 0
for i in range(s):
	r = input()
	if r[0] == '+' or r[-1] == '+':
		res += 1
	else:
		res -= 1
print(res)


n = int(input())
x = 0
for i in range(n):
	a = str(input())
	if int(a.count('+', 0, 3)) == 2:
		x += 1
	elif int(a.count('-', 0, 3)) == 2:
		x -= 1
print(x)


n = int(input())
output = 0
for _ in range(n):
	bit = input()
	if bit == '++X' or bit == 'X++':
		output += 1
	if bit == '--X' or bit == 'X--':
		output -= 1
print(output)


from sys import stdin, stdout
inp = [x for x in stdin.read().split()]
n = inp.pop(0)
count = 0
for x in inp:
	if x == 'X++' or x == '++X':
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
lis = []
c = 0
for i in range(0, n):
	exp = input()
	lis.append(exp)
for j in range(0, len(lis)):
	if lis[j] == '++X' or lis[j] == 'X++':
		c = c + 1
	else:
		c = c - 1
print(c)


t = int(input())
ans = 0
for test in range(0, t):
	if '++' in input():
		ans += 1
	else:
		ans -= 1
print(ans)


val = 0
for i in range(int(input())):
	s = input()
	if '+' in s:
		val += 1
	elif '-' in s:
		val -= 1
print(val)


n = int(input())
if n >= 1 and n <= 150:
	final = 0
	for i in range(n):
		statement = str(input())
		if len(statement) > 0:
			if '++' in statement:
				final = final + 1
			if '--' in statement:
				final = final - 1
	print(final)


X = 0
tests = int(input())
for _ in range(tests):
	s = str(input())
	if s.startswith('++') or s.endswith('++'):
		X += 1
	elif s.startswith('--') or s.endswith('--'):
		X -= 1
print(X)


n = int(input())
ans = 0
while n != 0:
	op = input()
	ans = ans - 1 if op.lower() == 'x--' or op.lower() == '--x' else ans + 1
	n = n - 1
print(ans)


n = int(input())
k = 0
for i in range(n):
	z = list(input())
	if '+' in z:
		k += 1
	else:
		k -= 1
print(k)


n = int(input())
X = 0
for i in range(n):
	string = input()
	if string == '++X' or string == 'X++':
		X += 1
	if string == '--X' or string == 'X--':
		X -= 1
print(X)


a = int(input())
b = 0
while a != 0:
	a = a - 1
	n = str(input())
	if n == 'X++' or n == '++X':
		b = b + 1
	else:
		b = b - 1
print(b)


n = int(input())
i = 0
result = 0
while i < n:
	str = input()
	i += 1
	for x in str:
		if x == 'X':
			continue
		elif x == '+':
			result += 1
			break
		else:
			result -= 1
			break
print(result)


import sys
import math as mt
t = int(input())
tot = 0
for __ in range(t):
	ans = 0
	s = input()
	for i in range(len(s)):
		if s[i] == '+':
			tot += 1
			break
		if s[i] == '-':
			tot -= 1
			break
print(tot)


n = int(input())
array = []
value = 0
if 1 <= n <= 150:
	for i in range(n):
		array.append(input())
for op in array:
	if op == 'X++' or op == '++X':
		value += 1
	elif op == 'X--' or op == '--X':
		value -= 1
print(value)


ip = input()
it = int(ip)
temp = 0
res = 0
while temp < it:
	st = input()
	if st == 'X++' or st == '++X':
		res += 1
	else:
		res -= 1
	temp += 1
print(res)


n = int(input())
value = 0
for item in range(n):
	current = input()
	if '++' in current:
		value += 1
	else:
		value -= 1
print(value)


x = 0
limit = int(input())
count = 0
while limit > count:
	user = input()
	if user == '++X' or user == 'X++':
		x += 1
	elif user == '--X' or user == 'X--':
		x -= 1
	count += 1
print(x)


n = int(input())
x = 0
for I in range(0, n):
	oper = input()
	if oper == '++x' or oper == 'x++' or oper == '++' or (oper == '++X') or (oper == 'X++'):
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
count = 0
for i in range(n):
	operation = input()
	for symbol in operation:
		if symbol == '+':
			count += 1
			break
		elif symbol == '-':
			count -= 1
			break
print(count)


n = int(input())
result = 0
for i in range(n):
	k = input()
	if '++' in k:
		result += 1
	elif '--' in k:
		result -= 1
print(result)


n = int(input())
ans = 0
for i in range(n):
	s = input()
	if s[0] == 'X' and s[1] == '+' and (s[2] == '+') or (s[0] == '+' and s[1] == '+' and (s[2] == 'X')):
		ans += 1
	if s[0] == 'X' and s[1] == '-' and (s[2] == '-') or (s[0] == '-' and s[1] == '-' and (s[2] == 'X')):
		ans -= 1
print(ans)


pocet = int(input())
vysledok = 0
for i in range(pocet):
	slouo = input()
	if '++' in slouo:
		vysledok += 1
	else:
		vysledok -= 1
print(vysledok)


n = int(input())
operations = []
i = 0
x = 0
while i < n:
	string = input()
	operations.append(string)
	i += 1
i = 0
while i < n:
	if '+' in operations[i]:
		x += 1
		i += 1
	else:
		x -= 1
		i += 1
print(x)


x = 0
n = eval(input())
for i in range(n):
	bit = input()
	if '+' in bit:
		x += 1
	elif '-' in bit:
		x -= 1
print(x)


n = int(input())
(l, s) = ([], 0)
for i in range(n):
	l.append(input())
	if '++' in l[i]:
		s = s + 1
	else:
		s = s - 1
print(s)


add = ord('X') + 2 * ord('+')
n = int(input())
x = 0
for i in range(n):
	if add == sum((ord(x) for x in input()[:3])):
		x += 1
	else:
		x -= 1
print(x)


count = 0
for i in range(int(input())):
	count += str(input()).count('++') or -1
print(count)


N = int(input())
X = 0
for i in range(N):
	L = input()
	F1 = L[0]
	F2 = L[1]
	F3 = L[2]
	if F1 == '-' or F2 == '-' or F3 == '-':
		X -= 1
	else:
		X += 1
print(X)


a = int(input())
s = 0
b = []
for x in range(a):
	b.append(str(input()))
for i in range(len(b)):
	if b[i] == '++X' or b[i] == 'X++':
		s += 1
	else:
		s -= 1
print(s)


n = int(input())
e = 0
for i in range(n):
	s = str(input())
	if '+' in s:
		e = e + 1
	else:
		e = e - 1
print(e)


k = 0
x = int(input())
for i in range(x):
	a = input()
	if a[0] == '+' and a[1] == '+' or (a[1] == '+' and a[2] == '+'):
		k = k + 1
	else:
		k = k - 1
print(k)


x = 0
num_lines = int(input())
for i in range(0, num_lines):
	line = input()
	if '++' in line:
		x += 1
	if '--' in line:
		x -= 1
print(x)


number = int(input())
p = 0
for i in range(number):
	s = input()
	if s[1] == '+':
		p = p + 1
	elif s[1] == '-':
		p = p - 1
print(p)


n = int(input())
x = 0
while n > 0:
	s = str(input())
	if s == '++X' or s == 'X++':
		x += 1
	elif s == '--X' or s == 'X--':
		x -= 1
	n -= 1
print(x)


number_of_input_lines = input()
x_initial_value = 0
for i in range(int(number_of_input_lines)):
	a = input()
	if '++' in a:
		x_initial_value = x_initial_value + 1
	else:
		x_initial_value = x_initial_value - 1
print(x_initial_value)


X = 0
for i in range(int(input())):
	temp = input()
	if '+' in list(temp):
		X += 1
	else:
		X -= 1
print(X)


n = int(input())
ans = 0
for x in range(n):
	current = input()
	if current == 'X++' or current == '++X':
		ans += 1
	else:
		ans -= 1
print(int(ans))


x = 0
num = int(input(''))
i = 0
while i < num:
	i += 1
	v = input('')
	if v.lower() == '++x' or v.lower() == 'x++':
		x += 1
	elif v.lower() == '--x' or v.lower() == 'x--':
		x -= 1
print(x)


def solve():
	x = 0
	for _ in range(int(input())):
		op = input()
		if op[1] == '+':
			x += 1
		else:
			x -= 1
	print(x)
solve()


num = int(input())
x = 0
i = 0
while i < num:
	i = i + 1
	op = list(input())
	if '+' in op:
		x = x + 1
	elif '-' in op:
		x = x - 1
print(x)


t = int(input())
n = 0
while t is not 0:
	s = input()
	a = s[0]
	b = s[1]
	c = s[2]
	if a == 'X':
		if b == '+':
			n = n + 1
		else:
			n = n - 1
	elif c == 'X':
		if b == '+':
			n = n + 1
		else:
			n = n - 1
	t = t - 1
print(n)


t = int(input())
ans = 0
for i in range(t):
	opr = input()
	if opr == 'x++' or opr == '++x' or opr == 'X++' or (opr == '++X'):
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
alpha = 0
alpha1 = 0
for i in range(n):
	l = input()
	if l == 'X++' or l == '++X':
		alpha += 1
	elif l == 'X--' or l == '--X':
		alpha1 += 1
print(alpha - alpha1)


x = 0
liste = []
n = int(input())
for i in range(n):
	liste.append(input())
for operation in liste:
	if operation == '++X' or operation == 'X++':
		x += 1
	elif operation == '--X' or operation == 'X--':
		x -= 1
print(x)


n = int(input())
count_plus = 0
count_minus = 0
result = 0
for k in range(n):
	statement = input()
	if statement.startswith('+') or statement.endswith('+'):
		count_plus += 1
	else:
		count_minus += 1
	result = count_plus - count_minus
print(result)


S = str([input() for n in range(int(input()))])
print(S.count('++') - S.count('--'))


x = int(input())
a = []
g = 0
for i in range(x):
	a.append(input())
	if a[i] == 'x++' or a[i] == '++x' or a[i] == 'X++' or (a[i] == '++X'):
		g = g + 1
	if a[i] == 'x--' or a[i] == '--x' or a[i] == 'X--' or (a[i] == '--X'):
		g = g - 1
print(g)


n = int(input())
X = 0
while n:
	op = input()
	X = X + (1 if '+' in op else -1)
	n -= 1
print(X)


x = 0
for i in [0] * int(input()):
	a = input().count('+')
	if a == 2:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
u = 0
x = 0
l = 0
while n > 0:
	z = [input()]
	for x in z:
		if x == '++X':
			u += 1
			break
		elif x == '--X':
			u -= 1
			break
		elif x == 'X++':
			u += 1
		elif x == 'X--':
			u -= 1
		l += 1
	n -= 1
print(u)


n = int(input())
A = ['' for i in range(n)]
X = 0
for i in range(n):
	A[i] = input()
	if A[i][1] == '+':
		X += 1
	elif A[i][1] == '-':
		X -= 1
print(X)


value = 0
for _ in range(int(input())):
	command = input()
	if command == '++X' or command == 'X++':
		value += 1
	else:
		value -= 1
print(value)


import sys
n = int(input())
x = 0
loopCounter = 1
for line in sys.stdin:
	command = line.rstrip()
	if command.find('+') != -1:
		x += 1
	else:
		x -= 1
	if loopCounter == n:
		print(x)
		break
	loopCounter += 1


solve = 0
for i in range(int(input())):
	a = input()
	if a[1] == '+':
		solve += 1
	else:
		solve -= 1
print(solve)


a = int(input())
m = 0
while a > 0:
	b = input()
	c = list(b)
	d = c.count('+')
	e = c.count('-')
	if d == 2:
		m = m + 1
	if e == 2:
		m = m - 1
	a = a - 1
print(m)


n = int(input())
s = []
x = 0
for i in range(n):
	l = input()
	if l.find('++') >= 0:
		x += 1
	elif l.find('--') >= 0:
		x -= 1
print(x)


def main():
	n = int(input())
	ct = 0
	lines = []
	while ct < n:
		line = [i for i in input().split()]
		if line:
			lines.append(line)
			ct += 1
	x = 0
	for i in lines:
		for j in i:
			if '++' in j:
				x += 1
			else:
				x -= 1
	print(x)
main()


import sys
n = int(sys.stdin.readline())
x = 0
for l in range(n):
	st = sys.stdin.readline()
	if st.count('+') == 2:
		x += 1
	if st.count('-') == 2:
		x -= 1
print(x)


X = 0
cnt = int(input(''))
inc_list = ['X++', '++X']
dec_list = ['X--', '--X']
for z in range(cnt):
	op = input('')
	op = op.upper()
	if op in inc_list:
		X = X + 1
	else:
		X = X - 1
print(X)


x = int(input())
result = 0
for i in range(0, x):
	sentencia = input()
	result = result + sentencia.count('++') - sentencia.count('--')
print(result)


n = int(input())
l = list()
chp = '++X'
chpp = 'X++'
chm = '--X'
chmm = 'X--'
s = 0
for i in range(n):
	l.append(input())
for i in range(len(l)):
	if l[i] in chp or l[i] in chpp:
		s += 1
	elif l[i] in chm or l[i] in chmm:
		s -= 1
print(s)


numStatemnets = int(input())
x = 0
res = 0
for i in range(numStatemnets):
	stm = input()
	if '+' in stm:
		res = res + x + 1
	else:
		res = res + x - 1
print(res)


n = int(input())
x = 0
for i in range(n):
	condition = input().strip(' ')
	if '+' in condition:
		x = x + 1
	elif '-' in condition:
		x = x - 1
print(x)


X = 0
while True:
	n = int(input())
	if n in range(1, 151):
		break
for i in range(n):
	if input() in ['X++', '++X']:
		X = eval('X + 1')
	else:
		X = eval('X - 1')
print(X)


from math import *
var = int(input())
count = var
operation = []
i = int(0)
x = int(0)
while count != 0:
	temp = input()
	operation.append(temp)
	if operation[i].lower() == '++x' or operation[i].lower() == 'x++':
		x += 1
	if operation[i].lower() == '--x' or operation[i].lower() == 'x--':
		x -= 1
	i += 1
	count -= 1
print(x)


num1 = int(input())
result = 0
for i in range(num1):
	opr = input()
	if ord(opr[0]) + ord(opr[1]) + ord(opr[2]) == 174:
		result += 1
	else:
		result += -1
print(result)


ans = 0
for _ in range(int(input())):
	a = input()
	for i in range(len(a)):
		if a[i] == '+':
			ans += 1
			break
		elif a[i] == '-':
			ans -= 1
			break
print(ans)


n = int(input())
bitplus = 0
for i in range(n):
	operand = input()
	if operand == 'X++' or operand == '++X':
		bitplus += 1
	elif operand == '--X' or operand == 'X--':
		bitplus -= 1
print(bitplus)


n = int(input())
cnt = 0
for i in range(n):
	st = input()
	if st[1] == '+':
		cnt += 1
	elif st[1] == '-':
		cnt -= 1
print(cnt)


c = int(input())
cont = 0
for i in range(0, c):
	x = str(input())
	if x[1] == '+':
		cont += 1
	elif x[1] == '-':
		cont -= 1
print(cont)


t = int(input())
x = 0
while t > 0:
	inp = input()
	if '++' in inp:
		x += 1
	if '--' in inp:
		x -= 1
	t -= 1
print(x)


n = int(input())
ans = 0
for i in range(n):
	arr = str(input())
	if arr[0] == '+' or arr[len(arr) - 1] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


x = 0
n = int(input())
for i in range(n):
	s = str(input())
	for j in range(3):
		if s[j] == '+':
			x += 1
			break
		elif s[j] == '-':
			x -= 1
			break
print(x)


t = int(input(''))
c = 0
list = []
for i in range(0, t):
	s = str(input(''))
	l = s.split('X')
	for items in l:
		if items != '':
			if items == '++':
				c = c + 1
			elif items == '--':
				c = c - 1
print(c, end=' ')


import sys
input()
accum = 0
for line in sys.stdin:
	if '++' in line:
		accum += 1
	else:
		accum -= 1
print(accum)


n = int(input())
x = 0
for i in range(n):
	st1 = input()
	if st1.count('+') == 2:
		x += 1
	if st1.count('-') == 2:
		x -= 1
print(x)


n = int(input())
w = 0
k = 0
while w < n:
	a = input()
	b = a.count('+')
	c = a.count('-')
	k = k + b - c
	w += 1
print(int(k / 2))


from sys import stdin, stdout
n = int(stdin.readline())
x = 0
for i in range(n):
	op = stdin.readline().strip()
	if op == 'X++':
		x += 1
	elif op == '++X':
		x += 1
	elif op == 'X--':
		x -= 1
	elif op == '--X':
		x -= 1
print(x)


t = int(input())
x = 0
for _ in range(t):
	operator = str(input())
	if '++' in operator:
		x += 1
	elif '--' in operator:
		x -= 1
print(x)


import re
n = int(input())
k = 0
for i in range(n):
	s = input()
	if s.find('+') != -1:
		k += 1
	else:
		k -= 1
print(k)


n = int(input())
X = 0
for i in range(n):
	statement = input()
	statement_list = statement.split('X')
	for i in statement_list:
		if i == '++':
			X += 1
		elif i == '--':
			X -= 1
		else:
			continue
print(X)


n = int(input())
strings = list()
for i in range(n):
	strings.append(input())
x = 0
for i in strings:
	if '+' in i:
		x += 1
	if '-' in i:
		x -= 1
print(x)


n = int(input())
k = 0
i = 0
while i <= n - 1:
	S = input()
	if S[1] == '+':
		k = k + 1
	else:
		k = k - 1
	i = i + 1
print(k)


def main():
	opreators = {'X++': 1, 'X--': -1, '++X': 1, '--X': -1}
	n = int(input())
	result = 0
	for i in range(n):
		result += opreators[input()]
	print(result)
main()


x = int(input())
c = 0
while x != 0:
	y = input()
	if y[0] == '+':
		c = c + 1
	elif y[0] == '-':
		c = c - 1
	elif y[-1] == '+':
		c = c + 1
	elif y[-1] == '-':
		c = c - 1
	x = x - 1
print(c)


n = int(input())
val = 0
for i in range(n):
	word = input()
	if word[0] == '+' or word[2] == '+':
		val = val + 1
	else:
		val = val - 1
print(val)


def main():
	t = int(input())
	res = 0
	for i in range(t):
		s = input()
		for x in s:
			if x == '+':
				res += 1
				break
			elif x == '-':
				res -= 1
				break
	print(res)
main()


n = int(input())
no = 0
for i in range(n):
	string = input()
	if '++' in string:
		no = no + 1
	else:
		no = no - 1
print(no)


m = int(input())
inp = []
for i in range(0, m):
	inp.append(list(input()))
count = 0
for i in range(len(inp)):
	val = inp[i]
	if '+' in val:
		count += 1
	if '-' in val:
		count -= 1
print(count)


x = 0
for i in range(int(input())):
	cmd = input()
	if cmd.find('+') != -1:
		x += 1
	else:
		x -= 1
print(x)


a = int(input())
c = 0
for i in range(a):
	b = input()
	if '+' in b:
		c += 1
	else:
		c -= 1
print(c)


suma = 0
número_de_sentencias = int(input())
for a in range(1, número_de_sentencias + 1):
	b = input()
	if b == 'X++' or b == '++X':
		b = 1
	elif b == 'X--' or b == '--X':
		b = -1
	else:
		b = 0
	suma = suma + b
print(suma)


while True:
	try:
		n = int(input())
		x = 0
		for i in range(n):
			line = input()
			line = line.strip('X')
			if line == '++':
				x += 1
			else:
				x -= 1
		print(x)
	except EOFError:
		break


numcomands = eval(input())
i = 1
x = 0
while i <= numcomands:
	comand = input()
	if comand == 'X++' or comand == '++X':
		x = x + 1
	else:
		x = x - 1
	i = i + 1
print(x)


import math

def main():
	n = input()
	sum = 0
	for i in range(0, int(n)):
		s = input()
		if s == 'X++' or s == '++X':
			sum = int(sum) + 1
		else:
			sum = int(sum) - 1
	print(sum)
main()


def main():
	n = int(input())
	x = 0
	while n > 0:
		inp = input()
		if '+' in inp:
			x += 1
		else:
			x -= 1
		n -= 1
	print(x)
main()


n = int(input())
X = 0
a = '++'
b = '--'
for i in range(n):
	statement = input()
	if a in statement:
		X += 1
	if b in statement:
		X -= 1
print(X)


ans = 0
for i in range(int(input())):
	if input() in ['X++', '++X']:
		ans += 1
	else:
		ans -= 1
print(ans)


(n,) = map(int, input().split())
ans = 0
for i in range(n):
	s = str(input())
	if s[1] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


from sys import stdin, stdout
import math, sys
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import bisect as bi
import heapq

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())

def main():
	try:
		n = I()
		ans = 0
		for i in range(n):
			a = input()
			if '+' in a:
				ans += 1
			else:
				ans -= 1
		print(ans)
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(1):
	main()


def checkIt(command):
	if command[0] == '-' or command[2] == '-':
		return -1
	else:
		return 1
n = int(input())
x = 0
for i in range(n):
	command = input()
	x += checkIt(command)
print(x)


n = int(input())
l = []
for i in range(n):
	l.append(input())
x = 0
for s in l:
	if s.startswith('++X'):
		x = x + 1
	if s.startswith('--X'):
		x = x - 1
	if s == 'X++':
		x = x + 1
	if s == 'X--':
		x = x - 1
print(x)


x = int(input(' '))
i = 1
sum = 0
for i in range(1, x + 1):
	str = input(' ')
	if str == '++X':
		sum += 1
	elif str == 'X++':
		sum += 1
	elif str == 'X--':
		sum -= 1
	elif str == '--X':
		sum -= 1
print(sum)


stats = int(input())
tot = 0
for _ in range(stats):
	op = input()
	op = list(op)
	if op[1] == '+':
		tot += 1
	else:
		tot -= 1
print(tot)


counter = 0
a = int(input())
for i in range(a):
	d = input()
	if d[0] == '+' or d[-1] == '+':
		counter += 1
	if d[0] == '-' or d[-1] == '-':
		counter -= 1
print(counter)


n = int(input())
y = 0
for i in range(n):
	stat = input()
	if stat == '++X' or stat == 'X++':
		y += 1
	if stat == '--X' or stat == 'X--':
		y -= 1
print(y)


k = int(input())
x = 0
for i in range(k):
	letra = str(input())
	if letra[0] == '+' or letra[2] == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


p = 0
for _ in range(int(input())):
	x = input()
	if '++' in x:
		p += 1
	if '--' in x:
		p -= 1
print(p)


count = int(input())
numb = 0
for i in range(count):
	string = input()
	if '+' in string:
		numb += 1
	else:
		numb -= 1
print(numb)


def ev(s):
	k = list(s)
	if k.count('+') == 2:
		return 1
	else:
		return -1
n = int(input())
x = 0
for i in range(0, n):
	x = x + ev(input())
print(x)


count = 0
n = int(input())
for i in range(n):
	x = input()
	list(x)
	if '+' in x:
		count += 1
	elif '-' in x:
		count -= 1
print(count)


t = int(input())
d = 0
for i in range(0, t):
	n = input()
	if n[0] == '+' or n[0] == '-':
		if n[0] == '+':
			if i == t - 1:
				d = d + 1
				print(d)
				break
			else:
				d = d + 1
		elif i == t - 1:
			d = d - 1
			print(d)
			break
		else:
			d = d - 1
	elif n[2] == '+':
		if i == t - 1:
			d += 1
			print(d)
			break
		else:
			d = d + 1
	elif i == t - 1:
		d -= 1
		print(d)
		break
	else:
		d = d - 1


n = int(input())
count = 0
for i in range(0, n):
	b = str(input())
	if b[1] == '+':
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
s = 0
for x in range(n):
	a = input()
	if a[1] == '+':
		s += 1
	else:
		s -= 1
print(s)


n = int(input())
a = []
y = 1
counter = 0
for x in range(n):
	b = str(input())
	a.append(b)
if n == 1:
	if a[0] == 'X++' or a[0] == '++X':
		print(1)
	elif a[0] == 'X--' or a[0] == '--X':
		print(-1)
else:
	if a[0] == 'X++' or a[0] == '++X':
		counter += 1
	elif a[0] == 'X--' or a[0] == '--X':
		counter -= 1
	for x in range(n):
		if a[y] == 'X++' or a[y] == '++X':
			counter += 1
		elif a[y] == 'X--' or a[y] == '--X':
			counter -= 1
		y += 1
		if y == n:
			break
	print(counter)


n = int(input())
i = 0
x = 0
while i < n:
	a = input()
	if a == 'X--' or a == '--X':
		x -= 1
	if a == 'X++' or a == '++X':
		x += 1
	i += 1
print(x)


no_of_lines = int(input())
total = 0
for i in range(no_of_lines):
	s = input()
	if '++' in s:
		total += 1
	elif '--' in s:
		total -= 1
print(total)


ans = 0
t = int(input())
for i in range(t):
	string = input()
	if string[1] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


tc = int(input())
c = 0
for t in range(0, tc):
	n = str(input())
	if n.find('+') >= 0 and n.find('+') <= len(n):
		c += 1
	else:
		c -= 1
print(c)


n = int(input())
x = 0
for i in range(n):
	inp = input().lower().split('x')
	if '++' in inp:
		x += 1
	else:
		x -= 1
print(x)


_author_ = 'stefan'
n = int(input())
x = 0
for i in range(n):
	mystr = input()
	if '++' in mystr:
		x += 1
	elif '--' in mystr:
		x -= 1
print(x)


import re
n = input()
n = int(n)
ans = 0
for i in range(n):
	txt = input()
	x = re.search('((\\+\\+)|(\\-\\-))?X((\\+\\+)|(\\-\\-))?', txt)
	if x.group(2) == '++' or x.group(5) == '++':
		ans += 1
	elif x.group(3) == '--' or x.group(6) == '--':
		ans -= 1
print(ans)


c = int(input())
x = 0
for i in range(c):
	s = input()
	if s.count('++'):
		x = x + 1
	else:
		x = x - 1
print(x)


y = int(input(''))
x = 0
OpList = []
for value in range(y):
	OpList.append(input(''))
for val in OpList:
	if '+' in val:
		x = x + 1
	else:
		x = x - 1
print(x)


operations = int(input())
val = 0
while operations > 0:
	if '++' in input():
		val += 1
	else:
		val -= 1
	operations -= 1
print(val)


__author__ = 'amirarif'
n = int(input())
instructions = []
for i in range(0, n):
	s = input()
	s = s.split('X')
	s.remove('')
	instructions.append(s[0])
x = 0
for i in range(0, n):
	if instructions[i] == '++':
		x += 1
	else:
		x -= 1
print(x)


lines = int(input())
repeat = 0
x = 0
while repeat < lines:
	repeat = repeat + 1
	operation = input()
	if operation.count('+') == 2:
		x += 1
	elif operation.count('-') == 2:
		x -= 1
print(x)


n = int(input())
k = 0
for i in range(n):
	x = input()
	for j in x:
		if j == '+':
			k += 1
			break
		elif j == '-':
			k -= 1
			break
print(k)


a = int(input())
x = 0
for i in range(a):
	b = input()
	if b[0] == '+' or b[-1] == '+':
		x += 1
	elif b[0] == '-' or b[-1] == '-':
		x -= 1
print(x)


n = int(input())
an = 0
for i in range(n):
	s = input()
	if '-' in list(s):
		an -= 1
	else:
		an += 1
print(an)


try:
	print(sum((44 - ord(input()[1]) for i in [0] * int(input()))))
except:
	pass


no_of_statements = int(input())
lines = []
x = 0
for i in range(no_of_statements):
	line = input()
	lines.append(line)
for statement in lines:
	if '+' in statement:
		x += 1
	elif '-' in statement:
		x -= 1
print(x)


n = int(input().strip('\n\r\t '))
x = 0
for i in range(0, n):
	line = input()
	if '++' in line:
		x += 1
	elif '--' in line:
		x -= 1
print(x)


n = int(input())
count = 0
while n > 0:
	statement = input()
	if '++' in statement:
		count += 1
	else:
		count -= 1
	n -= 1
print(count)


x = 0
inp = int(input())
arr = []
ans = 0
for x in range(inp):
	arr.append(input())
for x in range(inp):
	if arr[x] == 'X++' or arr[x] == '++X':
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input(''))
out = 0
for i in range(0, n, 1):
	bit = input('')
	bit = list(bit)
	if '+' in bit:
		out += 1
	else:
		out -= 1
print(out)


n = int(input())
l = 0
for i in range(n):
	number = input()
	if '++' in number:
		l += 1
	elif '--' in number:
		l -= 1
print(l)


n = int(input())
c = 0
for i in range(n):
	s = input()
	if s == '++X' or s == 'X++':
		c += 1
	if s == '--X' or s == 'X--':
		c -= 1
print(c)


l1 = int(input())
op = ''
for i in range(l1):
	op += input()
print(int((op.count('+') - op.count('-')) / 2))


input_size = int(input())
x = 0
for z in range(input_size):
	curr = input()
	if curr[0] == '+' or curr[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


num = int(input())
x = 0
for i in range(num):
	exe = input()
	if exe[1] in '-':
		x = x - 1
	else:
		x = x + 1
print(str(x))


x = 0
for i in range(int(input())):
	if input().replace('X', '') == '++':
		x += 1
	else:
		x -= 1
print(x)


operations = []
for n in range(int(input())):
	operations.append(input())
plus = len([c for c in operations if '+' in c])
minus = len([c for c in operations if '-' in c])
print(plus - minus)


n = int(input())
x = 0
for k in range(n):
	a = input()
	if a == 'X++' or a == '++X':
		x += 1
	elif a == 'X--' or a == '--X':
		x -= 1
print(x)


n = int(input())
x = c = 0
while c < n:
	p = str(input())
	if p.count('++') == 1:
		x += 1
	elif p.count('--') == 1:
		x -= 1
	c += 1
print(x)


x = 0
n = int(input())
for i in range(n):
	com = str(input())
	if com == 'X++':
		x += 1
	if com == '++X':
		x += 1
	if com == '--X':
		x -= 1
	if com == 'X--':
		x -= 1
	if com == 'x++':
		x += 1
	if com == '++x':
		x += 1
	if com == '--x':
		x -= 1
	if com == 'x--':
		x -= 1
print(x)


import re

def hasSigns(inputString):
	plus = 0
	if bool(re.search('[+]{2}', inputString)):
		plus = 1
	elif bool(re.search('[-]{2}', inputString)):
		plus = 2
	return plus
try:
	n = int(input())
	if n >= 1 and n <= 150:
		x = 0
		while n > 0:
			op = input()
			if hasSigns(op) == 1:
				x += 1
			elif hasSigns(op) == 2:
				x -= 1
			n -= 1
		print(x)
except Exception as e:
	print(e)


veces = int(input())
con = 0
for i in range(veces):
	cadena = str(input())
	cadena = cadena.replace('X', '')
	if cadena == '++':
		con += 1
	else:
		con -= 1
print(con)


import math
n = int(input())
x = 0
for j in range(n):
	c = input()
	if '++' in c:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
pos = 0
neg = 0
for _ in range(n):
	a = str(input())
	if a[0] == '+':
		x += 1
	elif a[0] == '-':
		x -= 1
	elif a[-1] == '+':
		pos += 1
	elif a[-1] == '-':
		neg += 1
	x = x + pos - neg
	pos = 0
	neg = 0
print(x)


a = input()
x = 0
for i in range(int(a)):
	seq = list(input())
	if '+' in seq:
		x += 1
	else:
		x -= 1
print(x)


n = input()
n = int(n)
arr = [input() for i in range(n)]
x = 0
for j in range(n):
	if arr[j][1] == '+':
		x = x + 1
	elif arr[j][1] == '-':
		x = x - 1
print(x)


reps = int(input())
x = 0
for i in range(reps):
	cmd = input()
	if '+' in cmd:
		x = x + 1
	elif '-' in cmd:
		x = x - 1
print(x)


def solution():
	n = int(input())
	x = 0
	for _ in range(n):
		statement = input()
		if statement.startswith('+') or statement.endswith('+'):
			x += 1
		else:
			x -= 1
	print(str(x))
solution()


p = int(input())
l = 0
while not p == 0:
	p -= 1
	o = input()
	if o == '++X' or o == 'X++':
		l += 1
	if o == '--X' or o == 'X--':
		l -= 1
print(l)


n = int(input())
x = 0
for i in range(n):
	a = input()
	if a[0] == '+' and a[1] == '+':
		x = x + 1
	elif a[1] == '+' and a[2] == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


d = {'X++': 1, '++X': 1, 'X--': -1, '--X': -1}
n = int(input().strip())
x = 0
for i in range(n):
	x += d[input().strip()]
print(x)


n = int(input(''))
i = 0
x = 0
while i < n:
	q = input('')
	if q == 'X++' or q == '++X':
		x += 1
	elif q == 'X--' or q == '--X':
		x -= 1
	i += 1
print(x)


n = int(input())
x = 0
while n > 0:
	n -= 1
	e = input()
	if e[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


bit = 0
for i in range(int(input())):
	b = input()
	for j in range(len(b)):
		if b[j] == '+':
			bit = bit + 1 / 2
		if b[j] == 'X':
			bit = bit + 0
		if b[j] == '-':
			bit = bit - 1 / 2
print(int(bit))


n = int(input())
r = 0
for i in range(n):
	op = input()
	if op.count('+') == 2:
		r += 1
	elif op.count('-') == 2:
		r -= 1
print(r)


x = 0
for _ in range(int(input())):
	b = input()
	if b == '++X' or b == 'X++':
		x += 1
	else:
		x -= 1
print(x)


x = 0
n = input()
for Z in range(int(n)):
	op = input()
	if op == 'X++' or op == '++X':
		x = x + 1
	else:
		x = x - 1
print(x)


t = int(input())
c = 0
while t != 0:
	s = str(input())
	s = sorted(s)
	c = c + 1 if s[0] == '+' else c - 1
	t = t - 1
print(c)


n = int(input())
count = 0
for i in range(n):
	i = input()
	for p in range(len(i)):
		if i[p:p + 2] == '++':
			count += 1
	for p in range(len(i)):
		if i[p:p + 2] == '--':
			count -= 1
print(count)


row = input().split(' ')
n = int(row[0])
c = ['X++', '++X']
b = ['X--', '--X']
cont = 0
for i in range(n):
	a = input()
	if a in c:
		cont += 1
	elif a in b:
		cont = cont - 1
print(cont)


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_charList_from_str = lambda : list(sys.stdin.readline().strip())
get_char_list = lambda : sys.stdin.readline().strip().split()
get_int = lambda : int(sys.stdin.readline())
pt = lambda x: sys.stdout.write(str(x))
n = get_int()
x = 0
for i in range(n):
	s = get_string()
	if '+' in s:
		x += 1
	else:
		x -= 1
print(x)


ctr = 0
for i in range(int(input())):
	operation = input()
	if '+' in operation:
		ctr += 1
	else:
		ctr -= 1
print(ctr)


def main(n):
	return 1 if n[1] == '+' else -1
x = 0
for _ in range(int(input())):
	x += main(input())
print(x)


n_sentences = int(input())
counter = 0
for _ in range(n_sentences):
	if '+' in input():
		counter += 1
	else:
		counter -= 1
print(counter)


t = int(input())
n = 0
for _ in range(t):
	op = input()
	if op == '++X' or op == 'X++':
		n += 1
	if op == '--X' or op == 'X--':
		n -= 1
print(n)


n = int(input())
if 1 <= n <= 150:
	score = 0
	for i in range(n):
		operation = input()
		if operation[1] == '+':
			score += 1
		if operation[1] == '-':
			score -= 1
print(score)


lines = input()
counter = 0
for i in range(int(lines)):
	string = input()
	if string[0] == '-' or string[2] == '-':
		counter -= 1
	else:
		counter += 1
print(counter)


n = int(input())
x = 0
while n > 0:
	st = ''
	st = input()
	if '+' in st:
		x = x + 1
	elif '-' in st:
		x = x - 1
	n -= 1
print(x)


numberOfOperations = int(input())
x = 0
for i in range(numberOfOperations):
	operation = input()
	if operation[0] == '+' or operation[2] == '+':
		x = x + 1
	elif operation[0] == '-' or operation[2] == '-':
		x = x - 1
print(x)


def main1():
	l = []
	n = int(input())
	x = 0
	for i in range(n):
		new_element = str(input())
		l.append(new_element)
		if l[i] == '++X' or l[i] == 'X++':
			x += 1
		else:
			x -= 1
	print(x)
main1()


res = 0
for _ in range(int(input())):
	s = input()
	if '++' in s:
		res += 1
	elif '--' in s:
		res -= 1
print(res)


import sys

def get_vals(func=str):
	return map(func, input().split())

def get(func=str):
	return func(input())
input = lambda : sys.stdin.readline().rstrip('\r\n')
write = sys.stdout.write

def test():
	pass

def main():
	n = get(int)
	x = 0
	for i in range(n):
		sentence = input()
		if '+' in sentence:
			x += 1
		else:
			x -= 1
	print(x)
main()


x = 0
num_op = int(input())
plus = ['++X', 'X++']
for i in range(num_op):
	if input() in plus:
		x += 1
	else:
		x -= 1
print(x)


x = 0
n = int(input())
lst = []
for i in range(n):
	lst.append(str(input()))
for i in lst:
	if i == 'X++':
		x += 1
	elif i == '++X':
		x += 1
	elif i == '--X':
		x -= 1
	elif i == 'X--':
		x -= 1
print(x)


n = int(input())
x = 0
for i in range(n):
	s = input()
	if len(s) == 3 and 'X' in s:
		if '++' in s:
			x += 1
		elif '--' in s:
			x -= 1
		else:
			x = x
print(x)


from sys import stdin, stdout
a = int(stdin.readline())
cont = 0
for i in range(a):
	var = stdin.readline()
	if '--' in var:
		cont -= 1
	elif '++' in var:
		cont += 1
stdout.write(str(cont))


n = int(input())
x = 0
for i in range(n):
	str = input()
	for j in range(len(str) - 1):
		if str[j] == '+' and str[j + 1] == '+':
			x += 1
		elif str[j] == '-' and str[j + 1] == '-':
			x -= 1
print(x)


n = int(input().strip())
x = 0
for _ in range(n):
	k = input().strip()
	if k[0] == '+' or k[1] == '+':
		x += 1
	elif k[0] == '-' or k[1] == '-':
		x -= 1
print(x)


val = int(input())
x = 0
for i in range(val):
	value = input()
	if '+' in value:
		x += 1
	if '-' in value:
		x -= 1
print(x)


x = 0
num = int(input())
for i in range(num):
	command = str(input().split())
	if '++' in command:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for i in range(n):
	f = str(input())
	if f[1] == '+' or f[2] == '+':
		x += 1
	else:
		x -= 1
print(x)


def main():
	x = 0
	a = int(input())
	for i in range(0, a):
		temp = input()
		if temp.find('+') > -1:
			x += 1
		else:
			x -= 1
	print(x)
main()


N = int(input())
x = 0
for i in range(N):
	data = list(input())
	if data.count('+') == 2:
		x += 1
	elif data.count('-') == 2:
		x -= 1
print(x)


a = int(input())
i = 0
x = 0
while i < a:
	b = input().upper()
	c = b.split('X')
	if c[0] == '++' or c[1] == '++':
		x += 1
	elif c[0] == '--' or c[1] == '--':
		x -= 1
	i += 1
print(x)


n = int(input())
sum = 0
for i in range(n):
	str = input()
	if str == 'X++' or str == '++X':
		sum += 1
	else:
		sum -= 1
print(sum)


p = int(input())
l = []
plus = 0
minu = 0
for i in range(0, p):
	l.append(input())
	for a in range(0, 3):
		if l[i][a] == '+':
			plus = plus + 1
		elif l[i][a] == '-':
			minu = minu + 1
print(plus // 2 - minu // 2)


n = int(input())
c = 0
op = []
for i in range(n):
	op.append(input())
for i in op:
	if i == '++X' or i == 'X++':
		c += 1
	else:
		c -= 1
print(c)


LIMIT = int(input())
final = 0
for i in range(LIMIT):
	opr = input()
	if opr == 'X--' or opr == '--X':
		final = final - 1
	if opr == 'X++' or opr == '++X':
		final = final + 1
print(final)


x = 0
for i in range(int(input())):
	a = input()
	x += a[1] == '+' or -1
print(x)


from sys import stdin

def main():
	n = int(stdin.readline())
	x = 0
	for i in range(n):
		cad = stdin.readline().strip()
		if '+' in cad:
			x += 1
		else:
			x -= 1
	print(x)
main()


x = 0
for _ in range(int(input())):
	op = input()
	if '++' in op:
		x += 1
	elif '--' in op:
		x -= 1
print(x)


number = int(input())
answer = 0
for i in range(number):
	operation = input()
	if '+' in operation:
		answer += 1
	else:
		answer -= 1
print(answer)


x = 0
n = int(input())
seq = []
for line in range(n):
	seq.append(input())
for i in seq:
	if '++' in i:
		x += 1
	if '--' in i:
		x -= 1
print(x)


x = int(input())
l1 = []
for i in range(x):
	l1.append(input())
y = 0
for i in range(0, x):
	if '++' in l1[i]:
		y += 1
	elif '--' in l1[i]:
		y -= 1
print(y)


n = 0
for i in [0] * int(input()):
	k = input()
	if k[0] == '+' or k[1] == '+':
		n += 1
	else:
		n -= 1
print(n)


n = int(input())
sol = 0
i = 0
while i < n:
	command = input()
	if str('+') in command:
		sol += 1
	else:
		sol -= 1
	i += 1
print(sol)


import sys

def fastio():
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

def debug(*var, sep=' ', end='\n'):
	print(*var, file=sys.stderr, end=end, sep=sep)
INF = 10 ** 20
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br
ans = 0
(n,) = I()
for i in range(n):
	s = input()
	if '++' in s:
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
V = 0
for i in range(n):
	s = input()
	if s[0] == '-':
		V -= 1
	elif s[0] == '+':
		V += 1
	elif s[1] == '-':
		V -= 1
	else:
		V += 1
print(V)


a = 0
for _ in range(int(input())):
	if input().__contains__('+'):
		a += 1
	else:
		a -= 1
print(a)


n = int(input())
l = list()
num = 0
for i in range(n):
	s = input()
	l.append(s)
for s in l:
	if s[1] == '+':
		num += 1
	if s[1] == '-':
		num -= 1
print(num)


n = int(input())
X = 0
i = 0
while i < n:
	s = input()
	if '+' in s:
		X = X + 1
	else:
		X = X - 1
	i = i + 1
print(X)


t = int(input())
x = 0
for i in range(t):
	st = input()
	if '++' in st:
		x = x + 1
	if '--' in st:
		x = x - 1
print(x)


n = int(input())
l = []
for i in range(n):
	s = list(input())
	if '+' in s:
		l.append(1)
	else:
		l.append(-1)
print(sum(l))


num_statements = int(input())
INC_OPERATOR = ['X++', '++X']
DEC_OPERATOR = ['--X', 'X--']
bit_value = 0
while num_statements > 0:
	statement = input()
	if statement in INC_OPERATOR:
		bit_value += 1
	elif statement in DEC_OPERATOR:
		bit_value -= 1
	num_statements -= 1
print(bit_value)


x = 0
n = int(input())
statements = []
for _ in range(n):
	statements.append(input())
for statement in statements:
	for ch in statement:
		if not ch.isalpha():
			if ch == '+':
				x += 1
			else:
				x -= 1
			break
print(x)


a = int(input())
A = []
count1 = 0
for i in range(a):
	A.append(str(input()))
for j in A:
	if j == '++X' or j == '++x' or j == 'x++' or (j == 'X++'):
		count1 += 1
	else:
		count1 -= 1
print(count1)


n = int(input())
a = [input()[1] for i in range(n)]
print(a.count('+') - a.count('-'))


n = int(input())
x = 0
for i in range(0, n):
	op = input()
	if op[0] == '-' or op[1] == '-' or op[2] == '-':
		x = x - 1
	else:
		x = x + 1
print(int(x))


n = int(input())
r = 0
for i in range(n):
	l = input()
	k = l.find('++')
	if k > -1:
		r = r + 1
	else:
		r = r - 1
print(r)


D = int(input())
X = 0
for i in range(D):
	S = input()
	if S == 'X--' or S == '--X':
		X -= 1
	else:
		X += 1
print(X)


import sys
count = int(sys.stdin.readline().rstrip('\n'))
x = 0
for i in range(count):
	line = sys.stdin.readline().rstrip('\n')
	line = line.replace('X', '')
	if line == '++':
		x += 1
	elif line == '--':
		x -= 1
print(x)


n = int(input())
x = 0
for num in range(n):
	sndIn = input()
	if sndIn.count('+') == 2:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
k = 0
y = 0
while k < n:
	x = str(input())
	if x[1] == '+':
		y = y + 1
	else:
		y = y - 1
	k = k + 1
print(y)


inputUser = int(input())
counter = 0
for i in range(0, inputUser):
	operation = input()
	if operation == 'X++' or operation == '++X':
		counter = counter + 1
	elif operation == 'X--' or operation == '--X':
		counter = counter - 1
print(counter)


countStr = input()
count = int(countStr)
initial = 0
for _ in range(count):
	op = input()
	if op.find('++') >= 0:
		initial += 1
	else:
		initial -= 1
print(initial)


n = int(input())
number = 0
for i in range(n):
	statement = input()
	if statement == '++X':
		number += 1
	elif statement == 'X++':
		number += 1
	elif statement == '--X':
		number -= 1
	elif statement == 'X--':
		number -= 1
print(number)


integerInput = int(input())
value = 0
i = 0
for i in range(integerInput):
	int = input()
	if int == 'X++' or int == '++X':
		value += 1
	else:
		value -= 1
print(value)


n = int(input())
x = 0
for _ in range(n):
	s = input().rstrip()
	if s == '--X' or s == 'X--':
		x -= 1
	elif s == '++X' or s == 'X++':
		x += 1
print(x)


def check_value(val, s):
	if val == 'X++' or val == '++X':
		s += 1
	else:
		s -= 1
	return s
n = int(input())
x = 0
for i in range(n):
	state = input()
	x = check_value(state, x)
print(x)


p = int(input())
x = 0
for i in range(p):
	q = input()
	if '+' in q:
		x = x + 1
	if '-' in q:
		x = x - 1
print(x)


n = int(input(''))
loop = 0
calc = 0
while loop < n:
	usr = input('')
	if '++' in usr:
		calc += 1
	elif '--' in usr:
		calc -= 1
	loop += 1
print(calc)


n = int(input())
x = 0
while n > 0:
	n -= 1
	s = input()
	if '+' in s:
		x += 1
		continue
	if '-' in s:
		x -= 1
print(x)


N = int(input())
X = 0
for i in range(N):
	s = input()
	if s == '++X' or s == 'X++':
		X += 1
	else:
		X -= 1
print(X)


n = int(input())
x = 0
for i in range(0, n):
	st = str(input())
	if st == '++X' or st == 'X++':
		x += 1
	if st == '--X' or st == 'X--':
		x -= 1
print(x)


n = int(input())
g = 0
for i in range(n):
	s = str(input())
	if s == 'X++' or s == '++X':
		g += 1
	else:
		g -= 1
print(g)


n = int(input())
x = 0
for l in range(n):
	op = input()
	if '+' in op:
		x += 1
	if '-' in op:
		x -= 1
print(x)


n = int(input())
sum = 0
for i in range(n):
	s = input()
	if s[0] == 'X':
		if s[1:] == '++':
			sum += 1
		else:
			sum -= 1
	elif s[:2] == '++':
		sum += 1
	else:
		sum -= 1
print(sum)


n = int(input())
d = 0
z = []
for i in range(n):
	c = input()
	z.append(c)
	if c[0] == c[1] and c[0] == '+':
		d += 1
	elif c[0] == c[1] and c[0] == '-':
		d -= 1
	elif c[0] != c[1] and c[2] == '-':
		d = d - 1
	else:
		d = d + 1
if z[n - 1] == 'x++':
	print(d - 1)
elif z[n - 1] == 'x--':
	print(d + 1)
else:
	print(d)


q = int(input())
s = 0
for i in range(q):
	w = input()
	if w == '++X':
		s = s + 1
	if w == 'X++':
		s = s + 1
	if w == '--X':
		s = s - 1
	if w == 'X--':
		s = s - 1
print(s)


a = ['++', '--', 'X']
n = int(input())
c = 0
if n >= 1 and n <= 150:
	for i in range(0, n):
		s = input()
		if s == '++X' or s == 'X++':
			c += 1
		elif s == '--X' or s == 'X--':
			c += -1
else:
	quit()
print(c)


Lines = int(input())
x = 0
for i in range(Lines):
	k = input()
	if '++' in k:
		x += 1
	elif '--' in k:
		x -= 1
print(x)


queries = int(input().strip())
total = 0
opval = {'+': 1, '-': -1}
for q in range(queries):
	s = input().strip()
	op = s[1]
	total += opval[op]
print(total)


t = int(input())
x = 0
while t != 0:
	x1 = input()
	if '++' in x1:
		x = x + 1
	if '--' in x1:
		x = x - 1
	t = t - 1
print(x)


n = input()
n = int(n)
statements = []
x = 0
for i in range(n):
	s = input()
	statements.append(s)
for stmt in statements:
	if stmt == 'X++' or stmt == '++X':
		x = x + 1
	elif stmt == 'X--' or stmt == '--X':
		x = x - 1
	else:
		pass
print(x)


n = int(input())
c = 0
for i in range(n):
	p = input()
	for j in p:
		if j == '+':
			c += 1
			break
		elif j == '-':
			c -= 1
			break
print(c)


n = int(input())
x = 0
for i in range(n):
	l = input().strip()
	if l[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
while n > 0:
	operation = input()
	if operation[1] == '+':
		x += 1
	else:
		x -= 1
	n -= 1
print(x)


n = int(input())
x = 0
a = ['++X', 'X++', 'X--', '--X']
for i in range(0, n):
	op = input()
	if op == a[0] or op == a[1]:
		x += 1
	elif op == a[2] or op == a[3]:
		x -= 1
print(x)


n = int(input())
i = 1
res = 0
while i <= n:
	str = input()
	if str[1] == '-':
		res = res - 1
	else:
		res = res + 1
	i = i + 1
print(res)


a = int(input())
l = []
for i in range(1, a + 1):
	s = str(input())
	l.append(s)
b = 0
for i in l:
	if i == '++X' or i == 'X++':
		b = b + 1
	if i == '--X' or i == 'X--':
		b = b - 1
print(b)


N = int(input())
lis = []
C = 0
for i in range(N):
	expression = input()
	lis.append(expression)
for j in range(len(lis)):
	if lis[j] == '++X' or lis[j] == 'X++':
		C = C + 1
	else:
		C = C - 1
print(C)


n = int(input())
count = 0
for i in range(n):
	operation = input()
	if operation == '++X' or operation == 'X++':
		count += 1
	elif operation == '--X' or operation == 'X--':
		count -= 1
print(count)


n = int(input())
a = '++'
b = '--'
x = 0
for i in range(n):
	m = input()
	if a in m:
		x = x + 1
	if b in m:
		x = x - 1
print(x)


inputs = int(input())
expressions = []
for i in range(inputs):
	expressions.append(input())
value = 0
for exp in expressions:
	if '+' in exp:
		value += 1
	elif '-' in exp:
		value -= 1
print(value)


value = 0
num_of_statements = int(input())
for i in range(num_of_statements):
	statement = input()
	if '+' in statement:
		value += 1
	else:
		value -= 1
print(value)


n = int(input())
a = 0
c = 0
for i in range(n):
	b = input()
	if b == 'X++':
		c = c + 1
	elif b == '++X':
		c = c + 1
	elif b == '--X':
		c = c - 1
	elif b == 'X--':
		c = c - 1
print(c)


b = int(input())
ans = 0
for i in range(b):
	bitt = input()
	if '+' in bitt:
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
cou = 0
for i in range(n):
	k = input()
	if '+' in k:
		cou += 1
	if '-' in k:
		cou -= 1
print(cou)


n = int(input())
l = []
for i in range(n):
	l.append(input())
x = 0
for i in range(n):
	if l[i] == 'X++' or l[i] == '++X':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
arr = []
for i in range(n):
	x = input()
	arr.append(x)
count = 0
for i in arr:
	if i == '++X' or i == 'X++':
		count = count + 1
	else:
		count = count - 1
print(count)


n = int(input())
j = 0
i = 0
x = 0
s = []
while j < n:
	s.append(input())
	j += 1
j = 0
while j < len(s):
	i = 0
	while i < len(s[j]):
		if s[j][i].upper() != 'X':
			if s[j][i] == '+':
				x += 1
				i += 1
			elif s[j][i] == '-':
				x -= 1
				i += 1
		i += 1
	j += 1
print(x)


N = int(input())
X = 0
for i in range(N):
	string = input()
	for i in string:
		if '+' in i:
			X += 1
			break
		elif '-' in string:
			X -= 1
			break
print(X)


n = int(input())
r = 0
for i in range(n):
	s = input().strip()
	if s == '++X' or s == 'X++':
		r += 1
	else:
		r -= 1
print(r)


n = int(input())
z = str()
x = 0
for i in range(n):
	z = str(input())
	if z[0] == '+' or z[2] == '+':
		x += 1
	elif z[0] == '-' or z[2] == '-':
		x -= 1
print(x)


n = int(input().lower())
states = []
for i in range(n):
	states.append(input())
count = 0
for state in states:
	if state == '++X' or state == 'X++':
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
x = 0
k = 0
while k < n:
	k = k + 1
	t = input()
	if t == '++X' or t == 'X++':
		x = x + 1
	else:
		x = x - 1
print(x)


a = int(input())
count = 0
for i in range(a):
	b = input()
	if b == 'X++' or b == '++X':
		count += 1
	if b == 'X--' or b == '--X':
		count -= 1
print(count)


n = int(input())
X = 0
xInCode = 0
for i in range(n):
	code = input()
	if '+' in code:
		X += 1
	elif '-' in code:
		X = X - 1
print(X)


x = 0
ans = 0
for _ in range(int(input())):
	a = input()
	if a == '++X':
		x += 1
		ans = x
	elif a == 'X++':
		ans = x
		x += 1
	elif a == 'X--':
		ans = x
		x -= 1
	else:
		x -= 1
		ans = x
print(x)


n = int(input())
i = 0
while n > 0:
	num = input()
	if '+' in num:
		i += 1
	elif '-' in num:
		i -= 1
	n = n - 1
print(i)


n = int(input())
x = 0
for i in range(n):
	statement = list(input())
	count1 = statement.count('+')
	count2 = statement.count('-')
	if count1 == 2:
		x = x + 1
	elif count2 == 2:
		x = x - 1
print(x)


c = 0
n = int(input())
for i in range(n):
	str1 = input()
	if str1 == 'X++' or str1 == '++X':
		c += 1
	else:
		c -= 1
print(c)


n = int(input())
p = 0
m = 0
x = 0
for i in range(0, n):
	s = input()
	if '++' in s:
		p += 1
	elif '--' in s:
		m += 1
print(x + p - m)


x = int(input())
a = '+'
b = '-'
d = int(0)
while x > 0:
	y = str(input())
	if a in y:
		d += 1
	elif b in y:
		d -= 1
	x -= 1
print(d)


a = int(input())
l = []
for i in range(a):
	l.append(input())
s = 0
t = 0
for i in range(a):
	if l[i] == '++X' or l[i] == 'X++':
		s = s + 1
	if l[i] == '--X' or l[i] == 'X--':
		t = t - 1
print(s + t)


n = int(input())
count = 0
for i in range(n):
	s = input()
	if s == 'X++':
		count = count + 1
	elif s == '++X':
		count = count + 1
	elif s == '--X':
		count = count - 1
	elif s == 'X--':
		count = count - 1
print(count)


t = int(input())
ans = 0
for _ in range(t):
	exp = input()
	if exp[0] == '+' or exp[-1] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
x = 0
for _ in range(n):
	inp = input()
	for _ in range(inp.count('++')):
		x += 1
	for _ in range(inp.count('--')):
		x -= 1
print(x)


import sys
rawdata = sys.stdin.read()
data = list((n for n in rawdata.split()))
x = 0
for i in range(1, int(data[0]) + 1):
	if data[i] == '++X' or data[i] == 'X++':
		x = x + 1
	if data[i] == '--X' or data[i] == 'X--':
		x = x - 1
print(x)


repeatNumbers = int(input())
inputs = []
X = 0
for i in range(repeatNumbers):
	input2 = input()
	inputs.append(input2)
for i in inputs:
	wordLetters = list(i)
	for j in wordLetters:
		if not j in ('x', 'X'):
			if j == '+':
				X += 1
				break
			if j == '-':
				X -= 1
				break
			print('wat')
			break
print(X)


import sys
sys.stdout.write(str(sum(('+' in sys.stdin.readline() or -1 for _ in range(int(input()))))))


def solve():
	n_opers = int(input())
	variable = 0
	for _ in range(n_opers):
		oper = input()
		if '++' in oper:
			variable += 1
		else:
			variable -= 1
	print(variable)
solve()


line = int(input())
x = 0
while line != 0:
	stat = input()
	if stat == '++X' or stat == 'X++':
		x = x + 1
	else:
		x = x - 1
	line = line - 1
print(x)


n = int(input())
ct = 0
for i in range(n):
	oper = str(input())
	if '+' in oper:
		ct = ct + 1
	else:
		ct = ct - 1
print(ct)


n = int(input(''))
p = '+'
m = '-'
j = 0
for i in range(n):
	q = str(input(''))
	final = [each for each in q if each in p]
	if len(final) > 0:
		j = j + 1
	else:
		j = j - 1
print(j)


a = int(input())
jd = 0
for x in range(0, a):
	b = input()
	if b == 'X++' or b == '++X':
		jd = jd + 1
	elif b == '--X' or b == 'X--':
		jd = jd - 1
print(jd)


n = int(input())
cnt = 0
while n != 0:
	st = input()
	if st[0] == '+':
		cnt = cnt + 1
	elif st[0] == '-':
		cnt = cnt - 1
	elif st[1] == '+':
		cnt = cnt + 1
	else:
		cnt = cnt - 1
	n = n - 1
print(cnt)


n = int(input())
c = 0
for i in range(n):
	a = str(input())
	if a == '++X' or a == 'X++':
		c += 1
	else:
		c -= 1
print(c)


n = int(input())
comands = []
x = 0
for i in range(n):
	com = input().split('X')
	for elem in com:
		if elem == '++' or elem == '--':
			comands.append(elem)
for elem in comands:
	if elem == '++':
		x = x + 1
	else:
		x = x - 1
print(x)


x = 0
n = int(input())
while n != 0:
	a = input()
	if a[1] == '+':
		x += 1
	else:
		x += -1
	n += -1
print(x)


x = 0
n_of_statements = int(input())
for _ in range(n_of_statements):
	inp = str(input())
	if inp == '--X' or inp == 'X--':
		x -= 1
	else:
		x += 1
print(x)


statements = int(input(''))
X = 0
for statement in range(statements):
	operation = input('')
	if operation == 'X++' or operation == '++X':
		X = X + 1
	elif operation == 'X--' or operation == '--X':
		X = X - 1
print(X)


n = int(input())
summ = 0
for j in range(n):
	text = input()
	if text == 'X++' or text == '++X':
		summ += 1
	else:
		summ -= 1
print(summ)


loop_length = int(input())
x = 0
for i in range(loop_length):
	string = input()
	if string[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
l = []
m = 0
for i in range(n):
	a = input()
	b = list(a)
	if b[1] == '+':
		l.append(1)
	if b[1] == '-':
		l.append(-1)
for i in range(n):
	m += l[i]
print(m)


x = int(input(''))
count = 0
for i in range(0, x):
	a = input('')
	for j in a:
		if j == 'X':
			if a[1] == '+':
				count = count + 1
			else:
				count = count - 1
			break
		if j == '-' or j == '+':
			if j == '-':
				count = count - 1
			else:
				count = count + 1
			break
print(count)


n = int(input())
i = 0
c = 0
while i != n:
	j = input()
	if j == '++X' or j == 'X++':
		c = c + 1
	else:
		c = c - 1
	i = i + 1
print(c)


ans = 0
n = int(input())
for i in range(n):
	a = input()
	ans += a.count('++') - a.count('--')
print(ans)


countOfSentences = int(input())
result = int()
for i in range(countOfSentences):
	sentence = list(input())
	sentence.pop(sentence.index('X'))
	if sentence[0] == '+':
		result += 1
	else:
		result -= 1
print(result)


count = int(input())
total = 0

def inc_total():
	global total
	total = total + 1

def dec_total():
	global total
	total = total - 1
for i in range(0, count):
	if '-' in input():
		dec_total()
	else:
		inc_total()
print(total)


class codeforce:

	def __init__(self):
		self.inpn = input()
		self.l = self.lire_nombres()
		self.n = self.lire_nombre()

	def lire_nombres(self):
		ligne = self.inpn.split(' ')
		for (ind, ele) in enumerate(ligne):
			ligne[ind] = int(ele)
		return ligne

	def lire_nombre(self):
		return int(self.inpn)

	def liste():
		print('12')

class fmat:

	def __init__(self):
		pass

	def f004NextRound(self, l):
		(k, n) = (l[1], l[0])
		s = 0
		if 1 <= k <= n <= 50:
			code = codeforce()
			vals = code.l
			for (ind, ele) in enumerate(vals):
				if vals[ind] > 0 and vals[ind] >= vals[k - 1]:
					s += 1
		print(s)

	def f005DominoPiling(self, l):
		(a, b) = (l[0], l[1])
		print(a * b // 2)

	def f006bitplus(self, n):
		s = 0
		for i in range(n):
			sta = input().split('X')
			for j in range(2):
				if sta[j] == '++':
					s += 1
				elif sta[j] == '--':
					s -= 1
		print(s)
inp = codeforce()
fma = fmat()
fma.f006bitplus(inp.n)


number_of_statements = int(input())
counter = 0
x = 0
while counter < number_of_statements:
	statement = input()
	if '++' in statement:
		x += 1
	else:
		x -= 1
	counter += 1
print(x)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
n = int(input())
x = 0
for _ in range(n):
	s = input()
	if '+' in s:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
result = 0
for i in range(1, n + 1):
	statement = input()
	if statement == 'X++' or statement == '++X':
		result += 1
	else:
		result -= 1
print(result)


n = int(input())
ans = 0
for _ in range(n):
	op = str(input())
	if op == 'X++' or op == '++X':
		ans += 1
	else:
		ans -= 1
print(ans)


x = int(input())
arr = []
y = 0
for i in range(x):
	arr.append(input())
for i in range(len(arr)):
	if arr[i] == 'X++' or arr[i] == '++X':
		y = y + 1
	if arr[i] == 'X--' or arr[i] == '--X':
		y = y - 1
print(y)


c = 0
for _ in range(int(input())):
	s = input()
	if s[0] == 'X':
		if s[2] == '+':
			c += 1
		elif s[2] == '-':
			c -= 1
	elif s[0] == '+':
		c += 1
	elif s[0] == '-':
		c -= 1
print(c)


x = input()
x = int(x)
final = 0
hmmm = ''
for i in range(0, x):
	hmmm = input()
	if '+' in hmmm:
		final = final + 1
	else:
		final = final - 1
print(final)


l = []
for _ in range(int(input())):
	l.append(input())
s = 0
prev = ''
flag = 0
for i in range(len(l)):
	try:
		if l[i] == '++X':
			s += 1
		if l[i - 1] == 'X++':
			s += 1
		if l[i] == '--X':
			s -= 1
		if l[i - 1] == 'X--':
			s -= 1
	except:
		pass
print(s)


n = int(input())
i = 0
output = 0
while i != n:
	inp = input()
	if inp == '++X' or inp == 'X++':
		output += 1
	else:
		output -= 1
	i += 1
print(output)


import sys
try:
	sys.stdin = open('inputs.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
finally:
	input = sys.stdin.readline
	print = sys.stdout.write
n = int(input())
out = 0
for _ in range(n):
	code = input()
	for ch in code:
		if ch == '+':
			out += 1
			break
		elif ch == '-':
			out -= 1
			break
print(str(out))


n = int(input())
L = [input() for i in range(0, n)]
o = True
m = 0
for i in L:
	for j in range(0, 3):
		if i[j] == '+':
			o = True
			break
		elif i[j] == '-':
			o = False
			break
		else:
			pass
	if o == True:
		m += 1
	elif o == False:
		m -= 1
print(m)


n = int(input())
i = 0
lst = list()
while i < n:
	data = input()
	lst.append(data)
	i = i + 1
count = 0
for j in lst:
	if j == '++X' or j == 'X++':
		count = count + 1
	elif j == '--X' or j == 'X--':
		count = count - 1
print(count)


from sys import stdin, stdout

def main():
	n = int(stdin.readline())
	x = 0
	for i in range(n):
		if '++' in stdin.readline():
			x += 1
		else:
			x -= 1
	stdout.write(str(x) + '\n')
main()


total_inputs = int(input())
x = 0
if total_inputs < 1 or total_inputs > 150:
	exit()
for i in range(total_inputs):
	operator = input()
	if operator.lower() == '++x' or operator.lower() == 'x++':
		x += 1
	elif operator.lower() == '--x' or operator.lower() == 'x--':
		x -= 1
print(x)


n = int(input())
t = 0
while n > 0:
	s = input()
	if '++' in s:
		t = t + 1
	elif '--' in s:
		t = t - 1
	n = n - 1
print(int(t))


a = 0

def bit():
	lis = input()
	if '++' in lis:
		global a
		return 1
	if '--' in lis:
		return -1
inp = int(input())
for i in range(inp):
	a += bit()
	if i == inp - 1:
		print(a)


ans = int(0)
cik = int(input())
for i in range(0, cik):
	(a, b, c) = map(str, input())
	if a != 'X':
		if b == '+':
			ans = ans + 1
		else:
			ans = ans - 1
	elif b == '+':
		ans = ans + 1
	else:
		ans = ans - 1
print(ans)


line = int(input())
op = 0
for i in range(line):
	c = input()
	if c[0] == 'X':
		if c[1] == '+':
			op += 1
		else:
			op -= 1
	elif c[0] == '+':
		op += 1
	else:
		op -= 1
print(op)


n = int(input())
b = 0
for x in range(n):
	st = input()
	if st[1] == '+':
		b += 1
	else:
		b -= 1
print(b)


n = int(input())
x = 0
k = 0
for i in range(n):
	s = input()
	k = s.find('++')
	if k != -1:
		x += 1
	else:
		x -= 1
print(x)


count = 0
test = int(input())
for i in range(test):
	str = input()
	if str == 'X++' or str == '++X':
		count += 1
	else:
		count -= 1
print(count)


x = 0
n = int(input())
i = 0
while True:
	if i >= n:
		break
	else:
		row = input().split()
		i += 1
		if '+' in row[0]:
			x += 1
		if '-' in row[0]:
			x -= 1
print(x)


n = int(input())
x = 0
for i in range(n):
	string1 = input()
	if string1[0] != 'X':
		if string1[0] == '+':
			x += 1
		else:
			x -= 1
	elif string1[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
p = []
plus = 0
minus = 0
for i in range(0, n):
	p.append(input())
for i in p:
	if i[0] == '+' or i[-1] == '+':
		plus += 1
	else:
		minus += 1
ans = plus - minus
print(ans)


p = int(input())
c = 0
l = []
for i in range(p):
	m = input()
	l.append(m)
for j in range(len(l)):
	if l[j] == '++X' or l[j] == 'X++':
		c = c + 1
	else:
		c = c - 1
print(c)


N = int(input())
ans = 0
for i in range(N):
	x = input()
	for i in x:
		if i == '+':
			ans += 1
			break
		elif i == '-':
			ans -= 1
			break
print(ans)


n = int(input())
X = 0
for i in range(n):
	t = input()
	if t == '++X' or t == 'X++':
		X += 1
	else:
		X -= 1
print(X)


T = int(input())
value = 0
for i in range(T):
	S = str(input())
	if S == '++X':
		value += 1
	if S == 'X++':
		value += 1
	if S == '--X':
		value -= 1
	if S == 'X--':
		value -= 1
print(value)


print(sum((44 - ord(input()[1]) for j in [0] * int(input()))))


n = int(input())
lt = []
for i in range(0, n):
	lt.append(input())
x = 0
for i in range(0, n):
	if '+' in lt[i]:
		x += 1
	else:
		x -= 1
print(x)


x = 0
hueta = int(input())
actions = [input() for i in range(hueta)]
for action in actions:
	x += 1 if '++' in action else -1
print(x)


enter = int(input())
x = 0
for i in range(enter):
	article = input()
	if article[0] == '+' or article[1] == '+' or article[2] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
ans = 0
for _ in range(n):
	val = input()
	if val == '++X' or val == 'X++' or val == '+X+':
		ans += 1
	else:
		ans -= 1
print(ans)


s1 = '++X'
s2 = 'X++'
s3 = '--X'
s4 = 'X--'
c_a = 0
c_b = 0
for i in range(int(input())):
	s = input()
	if s == s1 or s == s2:
		c_a += 1
	else:
		c_b += 1
print(c_a - c_b)


a = a = 0
for i in [0] * int(input()):
	if '+' in input():
		a += 1
	else:
		a -= 1
print(a)


n = int(input())
i = 0
while n:
	a = input()
	a = list(a)
	if '+' in a:
		i = i + 1
	else:
		i = i - 1
	n = n - 1
print(i)


n = int(input())
cnt = 0
for i in range(0, n):
	y = input()
	if y[0] == '+' or y[2] == '+':
		cnt += 1
	elif y[0] == '-' or y[2] == '-':
		cnt -= 1
print(cnt)


n = int(input())
act = []
for i in range(n):
	act.append(input())
c = 0
for i in range(len(act)):
	if act[i] == 'X++' or act[i] == '++X':
		c = c + 1
	else:
		c = c - 1
print(c)


n = int(input())
result = 0
for x in range(n):
	lines = str(input())
	if lines[1] == '+':
		result += 1
	else:
		result -= 1
print(result)


n = int(input())
value = 0
for i in range(n):
	operation = list(map(str, input()))
	if '+' in operation:
		value += 1
	elif '-' in operation:
		value -= 1
print(value)


t = int(input())
lista = []
for i in range(t):
	lista.append(input())
x = 0
for i in lista:
	if i == 'X++' or i == '++X':
		x += 1
	else:
		x -= 1
print(x)


N = int(input())
count = 0
for i in range(N):
	L = input()
	if L == '++X' or L == 'X++':
		count += 1
	else:
		count -= 1
print(count)


t = int(input())
anwser = 0
for i in range(t):
	statement = input()
	if '+' in statement:
		anwser += 1
	if '-' in statement:
		anwser -= 1
print(anwser)


n = int(input())
count = 0
while n:
	op = input()
	if '+' in op:
		count += 1
	elif '-' in op:
		count -= 1
	n -= 1
print(count)


n = 0
for a in range(int(input())):
	b = input()
	if b[0] == '+' or b[1] == '+':
		n += 1
	else:
		n -= 1
print(n)


c = 0
for i in range(int(input())):
	a = input()
	if a[1] == '+' or a[0] == '+' or a[2] == '+':
		c += 1
	else:
		c -= 1
print(c)


summ = ['X++', '++X']
rev = ['X--', '--X']
j = 0
num = int(input())
for i in range(num):
	sent = input()
	if sent in summ:
		j += 1
	if sent in rev:
		j -= 1
print(j)


qtd = int(input())
total = 0
for i in range(qtd):
	entrada = input().split('X')
	for j in range(len(entrada)):
		if entrada[j] == '++':
			total += 1
		elif entrada[j] == '--':
			total -= 1
print(total)


n = int(input())
x = 0
for i in range(n):
	a = str(input())
	if a.count('++') == 1:
		x += 1
	else:
		x -= 1
print(x)


from sys import stdin, stdout

def main():
	line = stdin.readline()
	tot = 0
	for i in range(0, int(line)):
		line2 = stdin.readline()
		if '++' in line2:
			tot = tot + 1
		else:
			tot = tot - 1
	print(tot)
main()


nc = int(input())
res = 0
for c in range(nc):
	l = input()
	if l == 'X++' or l == '++X':
		res += 1
	else:
		res -= 1
print(res)


c = 0
n = int(input())
for i in range(n):
	str1 = str(input())
	if str1 == 'X++' or str1 == '++X':
		c += 1
	elif str1 == 'X--' or str1 == '--X':
		c -= 1
print(c)


rows = int(input())
x = 0
for i in range(0, rows):
	inputLine = input()
	if inputLine[1] == '+':
		x += 1
	elif inputLine[1] == '-':
		x -= 1
print(x)


x = int(input())
a = 0
for i in range(0, x):
	y = input()
	if '+' in y:
		a += 1
	if '-' in y:
		a -= 1
print(a)


def bit():
	x = 0
	n = input()
	for i in range(int(n)):
		operation = input()
		if operation[1] == '+':
			x += 1
		elif operation[1] == '-':
			x = x - 1
	return x
print(bit())


increment = lambda n: n + 1
discrement = lambda n: n - 1

def bit_plus_plus(status, n):
	if status in ('X++', '++X'):
		return increment(n)
	return discrement(n)
(x, n) = (0, int(input()))
while n > 0:
	status = input()
	x = bit_plus_plus(status, x)
	n -= 1
print(x)


def command(a):
	if a[0] == '+':
		return 1
	elif a[1] == '+':
		return 1
	else:
		return -1
n = int(input())
z = 0
i = 0
while i < n:
	i += 1
	z += command(input())
print(z)


n = int(input())
commands = []
for i in range(n):
	commands.append(input())
X = 0
for command in commands:
	if command == 'X++' or command == '++X':
		X += 1
	else:
		X -= 1
print(X)


n = int(input())
x = 0
while n > 0:
	n -= 1
	s = input()
	if s.find('+') != -1:
		x += 1
	elif s.find('-') != -1:
		x -= 1
print(x)


import math
import os
import random
import re
import sys
n = int(input())
value = 0
for _ in range(0, n):
	operation = input()
	if '+' in operation:
		value += 1
	else:
		value -= 1
print(value)


n = int(input())
a = 0
for i in range(n):
	b = {input()}
	if b & {'X++', '++X'} != set():
		a += 1
	else:
		a -= 1
print(a)


w = int(input())
x = 0
while w > 0:
	inp = input()
	if '++' in inp:
		x += 1
	if '--' in inp:
		x -= 1
	w -= 1
print(x)


count = 0
for _ in range(int(input())):
	inp = input()
	if inp in ('X++', '++X'):
		count += 1
	elif inp in ('X--', '--X'):
		count -= 1
print(count)


statements = int(input())
x = 0
for i in range(statements):
	statement = input()
	if '++X' in statement or 'X++' in statement:
		x += 1
	elif '--X' in statement or 'X--' in statement:
		x -= 1
	else:
		pass
print(x)


test = int(input())
total = 0
while test != 0:
	string = input()
	if string.find('++') == -1:
		total = total - 1
	elif string.find('--') == -1:
		total = total + 1
	test = test - 1
print(total)


M = int(input())
operations = []
for i in range(M):
	operations.append(input())
sum = 0
for operation in operations:
	if '++' in str(operation):
		sum += 1
	else:
		sum -= 1
print(sum)


n = int(input())
x = 0
for i in range(n):
	s = input()
	if s[0] == '+' and s[1] == '+' or (s[len(s) - 2] == '+' and s[len(s) - 1] == '+'):
		x += 1
	elif s[0] == '-' and s[1] == '-' or (s[len(s) - 2] == '-' and s[len(s) - 1] == '-'):
		x -= 1
print(x)


def bit(code):
	op1 = '++'
	c = 0
	for i in code:
		if i.__contains__(op1):
			c += 1
		else:
			c -= 1
	print(c)
count = int(input())
code = []
for i in range(count):
	val = input()
	code.append(val)
bit(code)


numInstructions = int(input())
init = 0
for i in range(0, numInstructions):
	instruction = input()
	if '+' in instruction:
		init += 1
	else:
		init -= 1
print(init)


n = int(input())
soma = 0
for c in range(0, n):
	p = input()
	ii = 0
	for i in p:
		if i == '-':
			ii = 1
	if ii == 1:
		soma -= 1
	else:
		soma += 1
print(soma)


import sys
import math
import array
n = int(input())
x = 0
for i in range(0, n):
	s = input()
	if s[0] == '+' or s[2] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
li = []
x = 0
for i in range(n):
	li.append(input())
for st in li:
	if st == '++X' or st == 'X++':
		x = x + 1
	else:
		x = x - 1
print(x)


num_of_opers = int(input())
l = []
for i in range(num_of_opers):
	x = input()
	l.append(x)
summ = 0
for i in l:
	if i.find('++') != -1:
		summ += 1
	if i.find('--') != -1:
		summ -= 1
print(summ)


INCRE = ('++X', 'X++')
DECRE = ('--X', 'X--')
n = int(input())
x = 0
for i in range(n):
	op = input()
	if op in INCRE:
		x += 1
	elif op in DECRE:
		x -= 1
print(x)


def dividir(word):
	return [char for char in word]
scann = input()
numbers = scann.split()
n = numbers[0]
n = int(n)
y = 0
for i in range(n):
	scann = input()
	aux = scann.split()
	x = dividir(aux[0])
	if x[0] == '+' or x[1] == '+':
		y += 1
	elif x[0] == '-' or x[1] == '-':
		y -= 1
print(y)


n = int(input())
x = 0
while n > 0:
	u = input()
	if '--' in u:
		x -= 1
	if '++' in u:
		x += 1
	n -= 1
print(x)


i = int(input())
add_num = 0
sub_num = 0
for j in range(i):
	inp = input()
	if '++' in inp:
		add_num += 1
	elif '--' in inp:
		sub_num += 1
print(add_num - sub_num)


n = int(input())
x = 0
cnt = 0
if 1 <= n <= 150:
	for i in range(n):
		s = str(input())
		if '++' in s:
			x += 1
		if '--' in s:
			x -= 1
	if not s:
		print('Строка не должна быть пустой')
	else:
		print(x)
else:
	print('Диапозон: 1 <= n <= 150')


from sys import stdin

def update(s):
	if '++' in s:
		return 1
	else:
		return -1

def solve():
	N = int(stdin.readline())
	count = 0
	for n in range(N):
		count += update(stdin.readline())
	return count
print(solve())


N = int(input())
A = []
ans = 0
for i in range(N):
	A.append(input())
	if A[i][0] == 'X':
		if A[i][1] == '+':
			ans += 1
		else:
			ans -= 1
	elif A[i][0] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


t = int(input())
x = 0
while t:
	t -= 1
	s = input()
	if '+' in s:
		x += 1
	else:
		x -= 1
print(x)


N = int(input())
X = 0
while N != 0:
	N -= 1
	instruction = input()
	if instruction == 'X++' or instruction == '++X':
		X += 1
	else:
		X -= 1
print(X)


import sys

def eprint(*args):
	print(*args, file=sys.stderr)
from os import path
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('all.txt', 'w')
else:
	input = sys.stdin.readline
import bisect
k = int(input())
c = 0
for i in range(k):
	s = input().rstrip()
	if '+' in s:
		c += 1
	else:
		c -= 1
print(c)


n = int(input())
va = 0
for i in range(n):
	r = input()
	if r == '++X' or r == 'X++':
		va += 1
	else:
		va -= 1
print(va)


x = 0
for _ in [0] * int(input()):
	a = list(input())
	if '-' in a:
		x -= 1
	else:
		x += 1
print(x)


l = []
y = []
for i in range(int(input())):
	x = input()
	l.append(x.count('++'))
	y.append(x.count('--'))
print(sum(l) - sum(y))


class P282A:

	def __init__(self):
		self.operations = []
		self.solution = 0

	def parse_input(self):
		number_of_operations = int(input())
		count = 0
		while count < number_of_operations:
			count += 1
			solution_information = input()
			self.operations.append(solution_information)

	def solve(self):
		for o in self.operations:
			if '++' in o:
				self.solution += 1
			else:
				self.solution -= 1

	def get_solution(self):
		return self.solution
p_282A = P282A()
p_282A.parse_input()
p_282A.solve()
print(p_282A.get_solution())


n = int(input())
counter = 0
for i in range(n):
	statement = input()
	if statement == '++X' or statement == 'X++':
		counter += 1
	elif statement == '--X' or statement == 'X--':
		counter -= 1
print(counter)


t = 0
for _ in range(int(input())):
	op = input()
	if '++' in op:
		t += 1
	else:
		t -= 1
print(t)


x = 0
num = int(input())
for i in range(num):
	line = input()
	if line.count('+') == 2:
		x += 1
	else:
		x -= 1
print(x)


import sys
n = int(input())
ans = 0
for i in range(n):
	s = input()
	if s[1] == '+':
		ans += 1
	elif s[1] == '-':
		ans -= 1
print(ans)


n = int(input())
count = 0
for i in range(n):
	x = input()
	count += x.count('++') - x.count('--')
print(count)


N = int(input())
X = 0
for i in range(N):
	S = input()
	if S[0] == 'X':
		z = -1
	else:
		z = 0
	if S[z] == '-':
		X -= 1
	else:
		X += 1
print(X)


i = int(input())
x = 0
s = False
for e in range(i):
	e = input()
	if e[0] == 'x' or e[0] == 'X':
		if e[2] == '+':
			s = True
	elif e[0] == '+':
		s = True
	if s:
		x += 1
	else:
		x -= 1
	s = False
print(x)


import sys

def gets():
	return sys.stdin.readline().strip()

def get():
	return int(sys.stdin.readline().strip())

def geti():
	return map(int, sys.stdin.readline().strip().split())

def getli():
	return list(map(int, sys.stdin.readline().strip().split()))
Sum = 0
for _ in range(get()):
	s = gets()
	if s[1] == '+':
		Sum += 1
	else:
		Sum -= 1
print(Sum)


n = int(input())
count = 0
while n != 0:
	s = input()
	if s == 'X++' or s == '++X':
		count += 1
	else:
		count -= 1
	n -= 1
print(count)


n = int(input())
s = [input() for i in range(n)]
a = 0
for i in s:
	if i.find('++') != -1:
		a += 1
	elif i.find('--') != -1:
		a -= 1
print(a)


x = 0
ops = []
n = int(input())
for i in range(n):
	ops.append(str(input()))
for op in ops:
	if '++' in op:
		x = x + 1
	elif '--' in op:
		x = x - 1
print(x)


no = int(input())
statements = [input() for i in range(no)]
final_output = 0
for statement in statements:
	if statement == 'X++' or statement == '++X':
		final_output += 1
	else:
		final_output -= 1
print(final_output)


n = int(input())
sum = 0
while n:
	s = input()
	if s[1] == '+':
		sum += 1
	else:
		sum -= 1
	n -= 1
print(sum)


def bitplusplus2(alist):
	x = 0
	plusOp1 = 'X++'
	plusOp2 = '++X'
	minusOp1 = 'X--'
	minusOp2 = '--X'
	for i in alist:
		if i.startswith(plusOp1) or i.startswith(plusOp2):
			x += 1
		elif i.startswith(minusOp1) or i.startswith(minusOp2):
			x -= 1
	return x
n = int(input())
alist = []
for i in range(n):
	m = input().strip()
	alist.append(m)
print(bitplusplus2(alist))


def xValue(arr):
	x = 0
	for i in arr:
		if '+' in i:
			x += 1
		else:
			x = x - 1
	return x
n = int(input())
arr = []
for i in range(n):
	arr.append(input())
print(xValue(arr))


n = int(input())
x = 0
for i in range(n):
	k = input()
	if k[0] == '+' or k[len(k) - 1] == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


n = int(input())
answer = 0
for i in range(0, n):
	s = set(input())
	if '+' in s:
		answer += 1
	else:
		answer -= 1
print(answer)


x = 0
for _ in range(int(input())):
	arr = list(input())
	if arr[0] == '+' and arr[2] == 'X' or (arr[0] == 'X' and arr[2] == '+'):
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
answer = 0
for i in range(n):
	cmd = input()
	if '+' in cmd:
		answer += 1
	else:
		answer -= 1
print(answer)


b = int(input(''))
ah = 0
while b > 0:
	yi = input('')
	if yi.lower() == '++x' or yi.lower() == 'x++':
		ah += 1
	elif yi.lower() == '--x' or yi.lower() == 'x--':
		ah -= 1
	b -= 1
print(ah)


rawInput = input()
n = int(rawInput)
x = 0
while n > 0:
	n -= 1
	rawInput = input()
	rawInput = rawInput.upper()
	if rawInput == 'X++':
		x += 1
	elif rawInput == '++X':
		x += 1
	elif rawInput == 'X--':
		x -= 1
	elif rawInput == '--X':
		x -= 1
print(x)


from sys import stdin, stdout
n = stdin.readline().rstrip()
x = 0
for i in range(int(n)):
	s = stdin.readline().rstrip()
	if '++' in s:
		x += 1
	elif '--' in s:
		x -= 1
print(x)


def bit_plus_plus(statements):
	return sum((1 if statement[1] == '+' else -1 for statement in statements))

def get_input():
	n = int(input())
	inp = []
	for _ in range(n):
		inp.append(input())
	return inp

def main():
	inp = get_input()
	result = bit_plus_plus(inp)
	print(result)
main()


n = int(input())
x = 0
while n > 0:
	m = input()
	if m[1] == '+':
		x = x + 1
	else:
		x = x - 1
	n = n - 1
print(x)


x = 0
numOfOperations = int(input())
i = 0
while i < numOfOperations:
	operation = input()
	if operation[:2] == '++' or operation[1:] == '++':
		x = x + 1
	else:
		x = x - 1
	i = i + 1
print(x)


n = int(input())
count = 0
for e in range(n):
	line = input()
	data = [d for d in line]
	data = list(set(data))
	for i in data:
		if i == '+':
			count += 1
		elif i == '-':
			count -= 1
print(count)


x = 0
q = int(input())
for i in range(q):
	s = input()
	if s.find('+') != -1:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
array = list()
for i in range(n):
	a = input()
	array.append(a)
for i in range(len(array)):
	if array[i] == 'X++' or array[i] == '++X':
		x = x + 1
	else:
		x = x - 1
print(x)


n = int(input())
x = 0
for i in range(n):
	x = x + 1 - 2 * int(input().find('+') < 0)
print(x)


n = int(input())
li = []
c = 0
for i in range(n):
	li.append(input())
for i in range(n):
	if li[i] == '++X' or li[i] == 'X++':
		c += 1
	if li[i] == '--X' or li[i] == 'X--':
		c -= 1
print(c)


x = 0
for _ in range(int(input())):
	s = input()
	for i in s:
		if i == '+':
			x += 0.5
		elif i == '-':
			x -= 0.5
print(int(x))


n = int(input())
val = 0
for i in range(n):
	s = input()
	if s[0] == '+' or s[0] == '-':
		if s[0] == '+':
			val = val + 1
		else:
			val = val - 1
	elif s[1] == '+':
		val = val + 1
	else:
		val = val - 1
print(val)


lis = []
second_lis = []
n = int(input())
for i in range(n):
	command = input()
	lis.append(command)
for _ in lis:
	if _ == 'X++' or _ == '++X':
		second_lis.append(1)
	else:
		second_lis.append(-1)
print(sum(second_lis))


n = int(input())
x = 0
for i in range(0, n):
	m = input()
	if str(m[1]) == '+':
		x += 1
	if str(m[1]) == '-':
		x -= 1
print(x)


def main():
	x = int(input())
	print(sum(('+' in input() or -1 for _ in range(x))))
main()


n = int(input())
p = 0
x = 0
while p < n:
	l = input()
	k = l.find('++')
	m = l.find('--')
	if k >= 0:
		x = x + 1
	if m >= 0:
		x = x - 1
	p = p + 1
print(x)


num = 0
n = int(input())
while n != 0:
	ent = input()
	if ent == '++X' or ent == 'X++':
		num += 1
	elif ent == '--X' or ent == 'X--':
		num -= 1
	n -= 1
print(num)


n = int(input())
res = 0
for i in range(n):
	statement = input().split(sep='X')
	if '++' in statement:
		res += 1
	elif '--' in statement:
		res -= 1
print(res)


x = 0
n = int(input())
if n >= 1 and n <= 150:
	for i in range(n):
		statement = str(input())
		if statement[0:2] == '++' or statement[1:3] == '++':
			x += 1
		elif statement[0:2] == '--' or statement[1:3] == '--':
			x += -1
	print(x)


l = int(input())
x = 0
for i in range(l):
	m = input()
	if m.count('+') > 0:
		x += 1
	else:
		x -= 1
print(x)


l = []
n = int(input())
x = 0
for _ in range(n):
	l.append(input())
for i in l:
	if i[1] == '+':
		x += 1
	elif i[1] == '-':
		x -= 1
	else:
		print('Not a valid Operation')
print(x)


import re
x = 0
n = int(input())
plus_regex = re.compile('(X\\+\\+)|(\\+\\+X)')
minus_regex = re.compile('(X\\-\\-)|(\\-\\-X)')
for i in range(n):
	command = input()
	if plus_regex.match(command):
		x += 1
	elif minus_regex.match(command):
		x -= 1
print(x)


n = int(input())
i = 1
c = 0
while i <= n:
	a = input()
	b = 0
	while b <= 2:
		if a[b] == '+':
			c += 0.5
		elif a[b] == '-':
			c -= 0.5
		b += 1
	i += 1
print('%d' % c)


n = int(input())
a = []
ans = 0
for i in range(n):
	a.append(input())
for i in range(n):
	if a[i] == '++X' or a[i] == 'X++':
		ans = ans + 1
	else:
		ans = ans - 1
print(ans)


n = int(input())
v = 0
i = 0
while i < n:
	i += 1
	op = input()
	if op == 'X++' or op == '++X':
		v += 1
	else:
		v -= 1
print(v)


x = 0
t = int(input())
while t:
	t = t - 1
	s = input()
	s = list(s)
	if s.count('+') > 1:
		x = x + 1
	else:
		x = x - 1
print(x)


from sys import stdin, stdout, setrecursionlimit

def get_int():
	return int(stdin.readline().strip())

def get_ints():
	return map(int, stdin.readline().strip().split())

def get_string():
	return stdin.readline().strip()

def get_list():
	return list(map(int, stdin.readline().strip().split()))
n = get_int()
x = 0
for _ in range(n):
	s = get_string()
	if s == 'X++' or s == '++X':
		x += 1
	else:
		x -= 1
stdout.write(str(x))


n = int(input())
variable = 0
for i in range(n):
	sentence = input()
	if '+' in sentence:
		variable += 1
	else:
		variable -= 1
print(variable)


t = int(input())
ans = 0
for _ in range(t):
	s = input()
	if s == '++X' or s == 'X++':
		ans += 1
	elif s == '--X' or s == 'X--':
		ans -= 1
print(ans)


operations = int(input())
bit_start = 0
for _ in range(operations):
	operate = input()
	if '-' in operate:
		bit_start -= 1
	else:
		bit_start += 1
print(bit_start)


n = eval(input())
x = 0
for i in range(n):
	input1 = input()
	if input1[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


total = 0
for _ in range(int(input())):
	x = input()
	if '+' in x:
		total += 1
	if '-' in x:
		total -= 1
print(total)


a = int(input())
count = 0
for i in range(a):
	temp = input()
	if temp == '++X':
		count += 1
	if temp == 'X++':
		count += 1
	if temp == '--X':
		count -= 1
	if temp == 'X--':
		count -= 1
print(count)


t = int(input())
b = 0
for i in range(t):
	r = input()
	if r == '++X' or r == 'X++':
		b += 1
	if r == '--X' or r == 'X--':
		b -= 1
print(b)


a = int(input())
k = 0
for i in range(a):
	if list(input())[1] == '+':
		k += 1
	else:
		k -= 1
print(k)


def read_input(n, l):
	n = int(input())
	for i in range(n):
		l.append(list(input()))
	return l
n = 0
l = []
value = 0
read_input(n, l)
for i in range(len(l)):
	l[i].sort()
	if l[i][0] == '+':
		value += 1
	else:
		value -= 1
print(value)


n = int(input())
k = 0
for i in range(n):
	b = input()
	for j in range(3):
		if b[j] == '+':
			k = k + 1
			break
		elif b[j] == '-':
			k = k - 1
			break
print(k)


def func():
	ctr = int(input())
	inp = []
	while ctr != 0:
		ctr = ctr - 1
		inp.append(input())
	x = 0
	for z in inp:
		if '++' in z:
			x = x + 1
		else:
			x = x - 1
	print(x)
func()


inp = input()
number = 0
for i in range(int(inp)):
	other_inp = input()
	for i in range(2):
		if other_inp[i] == '+':
			number += 1
			break
		elif other_inp[i] == '-':
			number -= 1
			break
print(number)


n = int(input())
count = 0
while n > 0:
	m = input()
	if m == 'X++' or m == '++X':
		count = count + 1
	elif m == 'X--' or m == '--X':
		count = count - 1
	n = n - 1
print(count)


x = 0
for line in range(int(input())):
	i = input()
	if i[0] == '+' or i[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


count = int(input())
result = 0
for i in range(count):
	word = input()
	if '+' in word:
		result += 1
	elif '-' in word:
		result -= 1
print(result)


n = int(input())
l = [input().upper() for i in range(n)]
out = [i.replace('X', '') for i in l]
nl = [i.replace('++', '1') for i in out]
nll = [i.replace('--', '-1') for i in nl]
ans = sum([int(i) for i in nll])
print(ans)


a = int(input())
x = 0
while a > 0:
	b = input()
	if '+' in b:
		x += 1
	if '-' in b:
		x -= 1
	a -= 1
print(x)


a = int(input())
Dictionary = {}
counter = 0
while counter <= a - 1:
	Dictionary[counter] = input()
	counter += 1
fin_val = 0
for x in Dictionary:
	if Dictionary[x] == 'X++' or Dictionary[x] == '++X':
		fin_val += 1
	elif Dictionary[x] == 'X--' or Dictionary[x] == '--X':
		fin_val -= 1
print(fin_val)


x = 0
for _ in range(int(input())):
	s = list(input())
	x += s.count('+') // 2
	x -= s.count('-') // 2
print(x)


x = int(input())

def bit(count):
	a = 0
	i = 0
	while i < count:
		temp = str(input())
		if temp[1] == '+':
			a += 1
		else:
			a -= 1
		i += 1
	return a
print(bit(x))


lines = int(input())
X = 0
for a in range(1, lines + 1):
	operation = input()
	if operation == 'X++' or operation == '++X':
		X = X + 1
	elif operation == 'X--' or operation == '--X':
		X = X - 1
print(X)


add = '++x'
add2 = 'x++'
sub = '--x'
sub2 = 'x--'
n = int(input(''))
m = []
for i in range(n):
	m.append(input('').lower())
x = 0
for i in m:
	if i == add or i == add2:
		x += 1
	elif i == sub or i == sub2:
		x -= 1
print(x)


x = int(input())
i = 0
f = 0
while i < x:
	y = input()
	if y.find('+') >= 0:
		f += 1
	else:
		f -= 1
	i += 1
print(f)


from sys import stdin
n = int(input())
a = sum(map(lambda s: 1 if s.find('++') >= 0 else -1, stdin.readlines()))
print(a)


startint = 0
n = int(input())
sloj = ['++X', 'X++']
for i in range(1, n + 1):
	a = input()
	if a in sloj:
		startint += 1
	else:
		startint -= 1
print(startint)


count = 0
for _ in range(int(input())):
	op = input()
	if op == '++X' or op == 'X++':
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
x = 0
while n:
	n -= 1
	b = input()
	for i in b:
		if i == '+':
			x += 1
			break
		if i == '-':
			x -= 1
			break
print(x)


import sys
n = int(input())
x = 0
for i in range(0, n):
	if str(input()).__contains__('++'):
		x += 1
	else:
		x -= 1
print(x)


import sys
s = sys.stdin.read()
s = s.replace('X', '')
S = s.split()
S.pop(0)
x = 0
for i in S:
	if i == '++':
		x = x + 1
	if i == '--':
		x = x - 1
print(x)


hm = int(input())
x = 0
for i in range(hm):
	strr = input()
	if strr == '++X':
		x += 1
	elif strr == 'X++':
		x += 1
	elif strr == '--X':
		x -= 1
	elif strr == 'X--':
		x -= 1
print(x)


n = int(input())
list1 = []
for i in range(0, n):
	word = input()
	list1.append(word)
count1 = list1.count('++X')
count1 = count1 + list1.count('X++')
count2 = list1.count('--X')
count2 = count2 + list1.count('X--')
print(count1 - count2)


n = int(input())
operations = []
for i in range(n):
	operations.append(input())
X = 0
for operation in operations:
	if '+' in operation:
		X += 1
	else:
		X -= 1
print(X)


n = int(input())
a = list()
res = 0
for i in range(n):
	a.append([str(x) for x in input().split()])
for i in range(len(a)):
	if '++' in ''.join(a[i]):
		res += 1
	else:
		res -= 1
print(res)


n = int(input())
k = 0
while n > 0:
	numbers = input()
	if '+' in numbers:
		k += 1
	elif '-' in numbers:
		k -= 1
	n -= 1
print(k)


num = int(input())
value = 0
while num != 0:
	x = input()
	if ('++' in x) == True:
		value += 1
	elif ('--' in x) == True:
		value -= 1
	num -= 1
print(value)


n = int(input())
x = 0
for _ in range(n):
	stmt = input()
	pos = 0
	while pos < len(stmt):
		if stmt[pos] == 'X':
			pos += 1
		elif stmt[pos] == '-' and stmt[pos + 1] == '-':
			x -= 1
			pos += 2
		elif stmt[pos] == '+' and stmt[pos + 1] == '+':
			x += 1
			pos += 2
print(x)


n = int(input())
x = []
s = 0
for i in range(n):
	a = input()
	x.append(a)
for i in range(n):
	b = x[i]
	for j in range(3):
		if b[j] == '+':
			s = s + 0.5
		if b[j] == '-':
			s = s - 0.5
print(int(s))


n = int(input())
x = 0
l = list()
for i in range(n):
	s = input()
	if s[0] == '+' or s[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


X = 0
for _ in range(int(input())):
	statement = input()
	if statement.count('+') == 2:
		X += 1
	elif statement.count('-') == 2:
		X -= 1
print(X)


X = 0
num_lines = int(input())
for n in range(num_lines):
	line = input()
	if line == 'X++' or line == '++X':
		X += 1
	if line == 'X--' or line == '--X':
		X -= 1
print(X)


x = int(input())
y = []
z = 0
for i in range(x):
	a = str(input())
	y.append(a)
for i in y:
	if i == 'X++' or i == '++X':
		z = z + 1
	else:
		z = z - 1
print(z)


n = int(input())
x = 0
for i in range(n):
	a = list(map(str, input()))
	if a[1] == '+':
		x += 1
	elif a[1] == '-':
		x -= 1
print(x)


x = int(input())
lis = []
for y in range(x):
	lis.append(input())
c = 0
for x in lis:
	if '+' in x:
		c += 1
	else:
		c -= 1
print(c)


linecount = int(input())
x = 0
for i in range(0, linecount):
	symbols = input()
	if symbols == 'X++' or symbols == '++X':
		x += 1
	elif symbols == 'X--' or symbols == '--X':
		x -= 1
print(x)


n = int(input())
res = 0
for v in range(1, n + 1):
	v = input()
	if '+' in v:
		res += 1
	else:
		res -= 1
print(res)


m = int(input())
x = 0
for i in range(0, m):
	state = input()
	if state == 'X++' or state == '++X':
		x = x + 1
	if state == 'X--' or state == '--X':
		x = x - 1
print(x)


n = int(input())
m = 0
for j in range(n):
	a = input()
	if a[0] == a[1]:
		if a[0] == '+':
			m = m + 1
		if a[0] == '-':
			m = m - 1
	if a[1] == a[2]:
		if a[2] == '+':
			m = m + 1
		if a[2] == '-':
			m = m - 1
print(m)


def count_check(li: list) -> int:
	sub1 = '++'
	sub2 = '--'
	val = 0
	for i in li:
		if sub1 in i:
			val += 1
		elif sub2 in i:
			val = val - 1
	return val

def main():
	n = int(input())
	li = []
	while n > 0:
		s = str(input())
		li.append(s)
		n = n - 1
	print(count_check(li))
main()


n = int(input())
result = 0
for i in range(n):
	var = input()
	if var[0] == '+' or var[-1] == '+':
		result += 1
	elif var[0] == '-' or var[-1] == '-':
		result -= 1
print(result)


n = int(input())
x = 0
inp_list = []
for i in range(0, n):
	inp = input()
	if inp.__contains__('++'):
		x = x + 1
		continue
	if inp.__contains__('--'):
		x = x - 1
		continue
print(x)


x = int(input())
varsum = 0
for i in range(x):
	var = input()
	first = var[0:2]
	second = var[1:3]
	if first == '--' or second == '--':
		varsum -= 1
	else:
		varsum += 1
print(varsum)


cant = int(input())
cont = 0
for a in range(0, cant):
	frase = input()
	if frase[1] == '-':
		cont = cont - 1
	else:
		cont = cont + 1
print(cont)


n = int(input())
X = 0
for i in range(n):
	while True:
		command = input()
		if command == '++X' or command == '--X' or command == 'X--' or (command == 'X++'):
			break
	if command == str('++X') or command == str('X++'):
		X += 1
	elif command == str('--X') or command == str('X--'):
		X -= 1
print(X)


test = int(input())
result = 0
for x in range(test):
	c = input()
	if c[1] == '+':
		result = result + 1
	elif c[1] == '-':
		result = result - 1
print(result)


number = 0
n = int(input())
for i in range(0, n):
	p = input()
	if p == '++X' or p == 'X++':
		number += 1
	elif p == '--X' or p == 'X--':
		number -= 1
print(number)


number = int(input())
count = 0
for n in range(number):
	x = input()
	if 'X--' in x or '--X' in x:
		count = count - 1
	elif 'X++' in x or '++X' in x:
		count = count + 1
print(count)


lines = []
j = 1
no_of_lines = int(input())
while True:
	if no_of_lines >= j:
		line = input()
		lines.append(line)
		j += 1
	else:
		break
x = 0
i = 0
while no_of_lines > i:
	if '+' in lines[i]:
		x += 1
	else:
		x -= 1
	i += 1
print(x)


q = int(input())
val = 0
for x in range(q):
	state = input()
	if state[:2] == '++' or state[1:] == '++':
		val += 1
	elif state[:2] == '--' or state[1:] == '--':
		val -= 1
print(val)


n = int(input())
op = []
for i in range(n):
	op.append(input())
x = 0
for val in op:
	if '+' in val:
		x += 1
	elif '-' in val:
		x -= 1
print(x)


def main():
	no_of_rows = int(input())
	start = 0
	for _ in range(no_of_rows):
		operation = input()
		if '-' in operation:
			start -= 1
		else:
			start += 1
	print(start)
main()


n = int(input())
liste = []
x = 0
for _ in range(n):
	liste.append(input())
for i in liste:
	if i[0] == '-':
		x -= 1
	elif i[0] == '+':
		x += 1
	elif i[2] == '-':
		x -= 1
	elif i[2] == '+':
		x += 1
print(x)


NumberOfOperation = input()
Final = 0
for i in range(int(NumberOfOperation)):
	Operation = input()
	if Operation == 'X++' or Operation == '++X':
		Final += 1
	elif Operation == 'X--' or Operation == '--X':
		Final -= 1
print(Final)


a = int(input())
arr = []
for i in range(a):
	arr.append(input())
x = 0
b = arr.count('++X')
c = arr.count('X++')
d = arr.count('--X')
e = arr.count('X--')
print(b + c - d - e)


cnt = 0
n = int(input())
for i in range(n):
	opr = input()
	if opr == '++X' or opr == 'X++':
		cnt = cnt + 1
	else:
		cnt = cnt - 1
print(cnt)


n = int(input())
var = 0
for x in range(n):
	op = input()
	if '++' in op:
		var += 1
	elif '--' in op:
		var -= 1
print(var)


n = int(input())
ls = []
x = 0
for c in range(0, n, 1):
	ls.append(input().strip())
for c in range(0, n, 1):
	if '+' in ls[c]:
		x += 1
	elif '-' in ls[c]:
		x -= 1
print(x)


n = int(input())
ans = 0
for x in range(n):
	s = input()
	if s.find('++') >= 0:
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
result = 0
for i in range(n):
	value = input()
	if value[0] + value[1] == '++' or value[1] + value[2] == '++':
		result += 1
	elif value[0] + value[1] == '--' or value[1] + value[2] == '--':
		result -= 1
print(result)


x = 0
n = int(input())
for i in range(n):
	b = input()
	if b[0] == '+' or b[2] == '+':
		x = x + 1
	if b[0] == '-' or b[2] == '-':
		x = x - 1
print(x)


import sys
x = 0
n = int(sys.stdin.readline().strip())
lines = sys.stdin.readlines()
for line in lines:
	line = line.strip()
	if line == '++X' or line == 'X++':
		x += 1
	else:
		x -= 1
print(x)


w = input()
tab = []
for i in range(0, int(w)):
	tab.append(input())
value = 0
for i in tab:
	if '++' in i:
		value += 1
	elif '--' in i:
		value -= 1
print(value)


import sys
import math
import bisect
import re

def main():
	x = 0
	for _ in range(int(input())):
		s = input()
		if s == '++X':
			x += 1
		elif s == 'X++':
			x += 1
		elif s == '--X':
			x -= 1
		elif s == 'X--':
			x -= 1
	print(x)
main()


x = 0
prccsC = int(input())
for i in range(prccsC):
	prccsT = input()
	if prccsT == 'X++' or prccsT == '++X':
		x += 1
	else:
		x -= 1
print(x)


count = int(input())
res = 0
for x in range(0, count):
	inp = input()
	if inp.find('++') > -1:
		res += 1
	else:
		res -= 1
print(res)


def main():
	n = int(input())
	x = 0
	for i in range(n):
		lexims = input().split('X')
		if len(lexims) == 2 and '' in lexims:
			if '++' in lexims:
				x += 1
			if '--' in lexims:
				x -= 1
	print(x)
main()


inputs = int(input(''))
x = 0
for i in range(inputs):
	dunno = input('')
	if '++' in dunno:
		x += 1
	else:
		x -= 1
print(x)


def inp_n():
	n = int(input())
	return n

def inp_operation():
	operation = input()
	return operation
i = 0
plus = str('++')
minus = str('--')
counter = 0
n = inp_n()
while i < n:
	operation = inp_operation()
	i += 1
	if plus in operation:
		counter += 1
	elif minus in operation:
		counter -= 1
print(counter)


a = 0
b = 0
for _ in [0] * int(input()):
	c = input()
	if '++' in c:
		a += 1
	else:
		b += 1
print(a - b)


a = int(input())
b = [int(i) for i in range(1, a + 1)]
c = [input() for i in b]
count = 0
for i in range(0, len(c)):
	if c[i] == 'X++' or c[i] == '++X':
		count += 1
	elif c[i] == 'X--' or c[i] == '--X':
		count -= 1
print(count)


cases = int(input())
c = 0
words = []
while cases > c:
	a = input()
	c += 1
	words.append(a)
x = 0
for i in words:
	if i == 'x++' or i == '++x' or i == 'X++' or (i == '++X'):
		x += 1
	elif i == 'x--' or i == '--x' or i == 'X--' or (i == '--X'):
		x -= 1
print(x)


def bitLand():
	n = int(input())
	x = 0
	if n < 1 or n > 150:
		print('Bad Entry')
		return
	for i in range(0, n):
		a = input().strip()
		a.replace(' ', '')
		l = len(a)
		if l > 3:
			print('Bad Entry')
			return
		else:
			j = 0
			while j < l - 1:
				if a[j] == '+' and a[j + 1] == '+':
					x = x + 1
				elif a[j] == '-' and a[j + 1] == '-':
					x = x - 1
				j = j + 1
	print(x)
bitLand()


t = int(input())
c = 0
for x in range(0, t):
	s = input()
	if '+' in s:
		c += 1
	elif '-' in s:
		c -= 1
	else:
		pass
print(c)


n = int(input())
equation = 0
for i in range(n):
	s = input()
	for i in range(len(s)):
		if s[i] == '+':
			equation += 0.5
		elif s[i] == '-':
			equation -= 0.5
print(int(equation))


l = ''.join((input() for x in range(int(input()))))
print(l.count('++') - l.count('--'))


import re

def calculate_result(program):
	result = 0
	for statement in program:
		if re.search('\\+\\+', statement):
			result += 1
		elif re.search('--', statement):
			result -= 1
	return result
no_of_statements = int(input().strip())
program = []
for i in range(no_of_statements):
	program.append(input().strip())
res = calculate_result(program)
print(res)


n = int(input())
total = 0
for x in range(n):
	stat = input()
	if stat[0] == '+' or stat[2] == '+':
		total += 1
	elif stat[0] == '-' or stat[2] == '-':
		total -= 1
print(total)


n = int(input())
value = 0
while n > 0:
	k = input()
	if k == '++X' or k == 'X++':
		value += 1
	else:
		value -= 1
	n -= 1
print(value)


n = int(input())
x = 0
for owo in range(n):
	oao = input()
	if '++' in oao:
		x += 1
	else:
		x -= 1
print(x)


val = 0
for _ in range(int(input())):
	bit = input()
	if bit == 'X++' or bit == '++X':
		val += 1
	else:
		val -= 1
print(val)


X = 0
z = int(input(''))
for c in range(z):
	y = input('')
	if y == '++X' or y == 'X++':
		X = X + 1
	else:
		X = X - 1
print(X)


n = int(input())
ans = 0
while n > 0:
	operation = input()
	if operation.find('+') > -1:
		ans += 1
	else:
		ans -= 1
	n -= 1
print(ans)


n = input()
statements = []
for i in range(int(n)):
	statements.append(input())
res = 0
for statement in statements:
	if '++' in statement:
		res += 1
	else:
		res -= 1
print(res)


n = int(input())
su = 0
for i in range(n):
	s = input()
	if s[0] == 'X':
		if s[1] == '+':
			su = su + 1
		else:
			su = su - 1
	elif s[0] == '+':
		su = su + 1
	else:
		su = su - 1
print(su)


n = int(input())
s = 0
p = []
for i in range(n):
	p.append(input())
for j in range(n):
	for k in range(3):
		if p[j][k] == '-':
			s -= 1
			break
		elif p[j][k] == '+':
			s += 1
			break
print(s)


n = int(input())
c = []
count = 0
for _ in range(n):
	t = input()
	if t == 'X++' or t == '++X':
		count += 1
	else:
		count -= 1
print(count)


n = int(input(''))
count = 0
for i in range(n):
	user_in = str(input(''))
	if user_in == '++X':
		count += 1
	elif user_in == 'X++':
		count += 1
	elif user_in == '--X':
		count -= 1
	else:
		count -= 1
print(count)


t = int(input())
c = 0
for _ in range(t):
	s = input().rstrip()
	if s.count('++') == 1:
		c += 1
	elif s.count('--') == 1:
		c -= 1
print(c)


act_num = int(input())
act_list = []
x = 0
for i in range(0, act_num):
	act_list.append(input())
	if act_list[i] == '++X' or act_list[i] == 'X++':
		x += 1
	elif act_list[i] == '--X' or act_list[i] == 'X--':
		x -= 1
print(x)


n = int(input(''))
x = 0
add = ['++X', 'X++']
subtract = ['--X', 'X--']
for i in range(0, n):
	operation = input('')
	if operation in add:
		x += 1
	if operation in subtract:
		x -= 1
print(x)


num = int(input(''))
total = 0
for i in range(num):
	command = input('')
	if command == '++X' or command == 'X++':
		total = total + 1
	elif command == '--X' or command == 'X--':
		total = total - 1
print(total)


hat = int(input())
x = 0
for i in range(hat):
	give = input()
	if give == '++X' or give == 'X++':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
c = 0
for i in range(n):
	s = input()
	try:
		s.index('+')
		c += 1
	except ValueError:
		c -= 1
print(c)


n = int(input(''))
list = []
for i in range(n):
	y = input('')
	list.append(y)
x = 0
if n >= 1 and n <= 150:
	for i in list:
		if i[1] == '+':
			x = x + 1
		if i[1] == '-':
			x = x - 1
print(x)


n = int(input())
i = n
d = n
c = 0
x = 0
list = []
while i != 0:
	a = input()
	list.append(a)
	i = i - 1
(b, e) = (-1, -1)
while c < n:
	b = list[c].find('+')
	e = list[c].find('-')
	if b >= 0:
		x = x + 1
		b = -1
	elif e >= 0:
		x = x - 1
		e = -1
	c = c + 1
print(x)


try:
	n = int(input())
	x = 0
	for _ in range(n):
		op = input()
		if op == '++X' or op == 'X++':
			x = x + 1
		elif op == '--X' or op == 'X--':
			x = x - 1
	print(x)
except EOFError:
	pass


p = int(input())
res1 = 0
for i in range(p):
	s1 = input()
	if s1 == '++X' or s1 == 'X++':
		res1 += 1
	elif s1 == '--X' or s1 == 'X--':
		res1 -= 1
print(res1)


n = input()
n_int = int(n)
x = 0
for i in range(n_int):
	state = input()
	x = x + 0.5 * state.count('+') - 0.5 * state.count('-')
print(int(x))


import sys
n = int(input())
resp = 0
for i in range(n):
	line = input()
	if line[1] == '-':
		resp -= 1
	else:
		resp += 1
print(resp)


import math
import sys
n = int(input())
cont = 0
for i in range(0, n):
	s = input()
	if s == '++X' or s == 'X++':
		cont += 1
	else:
		cont -= 1
print(cont)


count = 0
for _ in range(int(input())):
	t = list(input())
	if t[1] == '+':
		count += 1
	elif t[1] == '-':
		count -= 1
print(count)


x = 0
num = int(input())
for i in range(num):
	k = list(map(str, input()))
	if k.count('+') == 2:
		x += 1
	if k.count('-') == 2:
		x -= 1
	else:
		x = x + 0
print(x)


n = int(input())
cnt_plus = 0
cnt_minus = 0
for i in range(n):
	st = input()
	if st[0] == '+' or st[1] == '+':
		cnt_plus += 1
	elif st[0] == '-' or st[1] == '-':
		cnt_plus += -1
print(cnt_plus)


x = 0
for i in range(int(input())):
	input_two = input().lower()
	if input_two == '++x' or input_two == 'x++':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for i in range(n):
	l1 = list(input())
	if '+' in l1:
		x += 1
	if '-' in l1:
		x -= 1
	del l1
print(x)


contador = 0
for k in range(int(input())):
	entrada = input()
	if entrada[0] == '+' or entrada[-1] == '+':
		contador += 1
	else:
		contador -= 1
print(contador)


test_cases = int(input())
my_var = 0
for i in range(test_cases):
	a = input()
	if '+' in a:
		my_var += 1
	elif '-' in a:
		my_var -= 1
print(my_var)


t = int(input())
p = 0
for i in range(t):
	o = input()
	if o == '++X' or o == 'X++':
		p += 1
	else:
		p -= 1
print(p)


t = int(input())
inc = int()
dec = int()
for i in range(t):
	s = input()
	if s[:2] == '++' or s[-2:] == '++':
		inc += 1
	else:
		dec += 1
print(inc - dec)


a = int(input())
b = 0
c = 0
while b < a:
	if input().count('+'):
		c += 1
	else:
		c -= 1
	b += 1
print(c)


T = int(input())
count = 0
for _ in range(T):
	operation = input()
	if operation == '++X' or operation == 'X++' or operation == '+X+':
		count += 1
	else:
		count -= 1
print(count)


x = 0
for _ in range(int(input())):
	statement = input()
	if statement.startswith('+') or statement.endswith('+'):
		x += 1
	if statement.startswith('-') or statement.endswith('-'):
		x -= 1
print(x)


n = int(input())
total = 0
for i in range(n):
	a = []
	line = input()
	for i in str(line):
		a.append(i)
	if '+' in a:
		total += 1
	else:
		total -= 1
print(total)


result = 0
steps = int(input().strip().split(' ')[0])
for y in range(steps):
	in_str = input().strip()
	if in_str[0] == '+' or in_str[-1] == '+':
		result += 1
	else:
		result -= 1
print(result)


y = int(input())
x = 0
for num in range(y):
	command = input()
	if '+' in command:
		x += 1
	elif '-' in command:
		x -= 1
print(x)


n = int(input())
x = []
for i in range(0, n):
	a = str(input())
	x.append(a)
c = 0
for i in x:
	if i == 'X++':
		c += 1
	elif i == '++X':
		c += 1
	elif i == 'X--':
		c -= 1
	elif i == '--X':
		c -= 1
print(c)


from functools import reduce
n = int(input())
res = 0
for i in range(n):
	res += 1 if '++' in input() else -1
print(res)


n = int(input())
lll = list()
for a in range(n):
	lll.append(input())
countforx = 0
for l in lll:
	if l == '++X' or l == 'X++':
		countforx += 1
	elif l == '--X' or l == 'X--':
		countforx -= 1
print(countforx)


noOfOperations = int(input())
res = 0
for o in range(noOfOperations):
	operation = input()
	if '++' in operation:
		res += 1
	elif '--' in operation:
		res -= 1
print(res)


def Main():
	n = int(input())
	ans = 0
	for i in range(n):
		opr = input()
		if opr[1] == '+':
			ans += 1
		else:
			ans -= 1
	print(ans)
Main()


n = int(input())
k = 0
s = 0
while k < n:
	k += 1
	C = input()
	C = C.upper()
	if C == '++X' or C == 'X++':
		s = s + 1
	else:
		s = s - 1
print(s)


n = int(input())
res = 0
for i in range(n):
	stat = input().rstrip().lstrip()
	if stat == 'X++' or stat == '++X':
		res += 1
	elif stat == 'X--' or stat == '--X':
		res -= 1
print(res)


x = 0
for i in [0] * int(input()):
	operation = input()
	if operation == 'X++' or operation == '++X':
		x += 1
	elif operation == 'X--' or operation == '--X':
		x -= 1
print(x)


x = 0
for _i in range(int(input())):
	b = input()
	if b in ['++X', 'X++']:
		x += 1
	if b in ['--X', 'X--']:
		x -= 1
print(x)


n = int(input())
count = 0
for _ in range(n):
	i = input()
	if i.__contains__('+'):
		count += 1
	else:
		count -= 1
print(count)


t = int(input())
y = 0
while t > 0:
	s = input()
	if '+' in s:
		y = y + 1
	elif '-' in s:
		y = y - 1
	t = t - 1
print(y)


n = int(input())
i = 0
m = 0
while i < n:
	a = str(input())
	for j in a:
		if j == '+':
			m += 1
			break
		elif j == '-':
			m -= 1
			break
	i += 1
print(m)


x = int(input())
y = 0
z = []
t = 0
while y < x:
	y += 1
	u = input()
	z.append(u)
for r in z:
	if r[1] == '+':
		t += 1
	if r[1] == '-':
		t -= 1
print(t)


t = [int(e) for e in input().split()]
a = []
z = 0
for i in range(t[0]):
	a.append(input())
	if a[i] == 'X++' or a[i] == '++X':
		z += 1
	else:
		z -= 1
print(z)


import sys

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s)
	sys.stdout.write('\n')

def wi(n):
	sys.stdout.write(str(n))
	sys.stdout.write('\n')

def wia(a, sep=' '):
	sys.stdout.write(sep.join([str(x) for x in a]))
	sys.stdout.write('\n')

def main():
	n = ri()
	x = 0
	for _ in range(n):
		s = rs()
		if s[0] == '+' or s[1] == '+' or s[2] == '+':
			x += 1
		else:
			x -= 1
	wi(x)
main()


from sys import stdin
numbers = stdin.read().split()
z = numbers.pop(0)
value = 0
for x in numbers:
	if x == '--X' or x == 'X--':
		value -= 1
	elif x == '++X' or 'X++':
		value += 1
print(value)


numOfLines = int(input())
value = 0
for x in range(numOfLines):
	command = input()
	if command == '++X' or command == 'X++':
		value += 1
	if command == '--X' or command == 'X--':
		value -= 1
print(value)


number = int(input())
count = 0
for i in range(number):
	valueX = input()
	if valueX == 'X++' or valueX == '++X':
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
resSol = 0
for i in range(n):
	bit = input()
	if '++' in bit:
		resSol = resSol + 1
	elif '--' in bit:
		resSol = resSol - 1
print(resSol)


n = int(input())
counter = 0
for a in range(n):
	(x, y, z) = input()
	if x == 'X' and y == '+' and (z == '+'):
		counter = counter + 1
	if x == '+' and y == '+' and (z == 'X'):
		counter = counter + 1
	if x == 'X' and y == '-' and (z == '-'):
		counter = counter - 1
	if x == '-' and y == '-' and (z == 'X'):
		counter = counter - 1
print(counter)


n = int(input())
list = []
m = 0
for i in range(n):
	list.append(input())
	if '++' in list[i]:
		m += 1
	elif '--' in list[i]:
		m -= 1
print(m)


n = int(input())
operation = ''
X = 0
for i in range(n):
	v = [str(i) for i in input().split()]
	if v[0] == '++X':
		X += 1
	elif v[0] == '--X':
		X -= 1
	elif v[0] == 'X--':
		X -= 1
	elif v[0] == 'X++':
		X += 1
print(X)


n = int(input())
val = 0
for _ in range(n):
	st = input()
	if st[1] == '+':
		val += 1
	else:
		val -= 1
print(val)


n = int(input())
s = 0

def x(a):
	if a == 'X++' or a == '++X':
		return 1
	else:
		return -1
for i in range(n):
	k = input()
	s += x(k)
print(s)


x = 0
operations = int(input())
for i in range(operations):
	op = input()
	if op.find('++') != -1:
		x = x + 1
	elif op.find('--') != -1:
		x = x - 1
print(x)


import sys
firstline = True
numlines = 0
x = 0
for line in sys.stdin:
	if firstline:
		numlines = int(line)
		firstline = False
		continue
	if '++' in line:
		x += 1
	elif '--' in line:
		x -= 1
	numlines -= 1
	if numlines <= 0:
		break
print(x)


x = 0
operations = int(input())
for i in range(operations):
	operation = str(input())
	if operation == 'X++' or operation == '++X':
		x += 1
	if operation == '--X' or operation == 'X--':
		x -= 1
print(x)


n = int(input())
hi = 0
for i in range(n):
	z = input()
	for (key, s) in enumerate(z):
		if s == '+':
			hi = hi + 1
			break
		elif s == '-':
			hi = hi - 1
			break
print(hi)


ans = 0
ops = int(input())
for i in range(ops):
	inp = input()
	if '--' in inp:
		ans -= 1
	else:
		ans += 1
print(ans)


_count = int(input())
_result = 0
for var in range(_count):
	_str = input()
	for var_i in _str:
		if var_i == '+':
			_result += 1
			break
		elif var_i == '-':
			_result -= 1
			break
print(_result)


n = int(input())
res = 0
k = 0
for i in range(1, n + 1):
	k = k + 1
	s = input()
	t1 = False
	t2 = False
	for j in range(0, 2):
		if s[j] == '-':
			t1 = True
		if s[j] == '+':
			t2 = True
	if t1:
		res = res - 1
	if t2:
		res = res + 1
print(res)


pc = 0
nc = 0
for i in range(int(input())):
	n = input()
	if n.count('+') > 1:
		pc += 1
	else:
		nc += 1
print(pc - nc)


n = int(input())
X = 0
for i in range(n):
	operations = [char for char in input()]
	operations_dic = {i: operations.count(i) for i in operations}
	if '-' in operations:
		X -= operations_dic['-'] / 2
	elif '+' in operations:
		X += operations_dic['+'] / 2
	else:
		pass
print(int(X))


k = int(input())
sum = 0
i = 0
while i < k:
	x = input()
	arti = x.count('++')
	eksi = x.count('--')
	sum += arti
	sum -= eksi
	i += 1
print(sum)


x = 0
i = 1
n = int(input())
while i <= n:
	t = list(input())
	if t[1] == '+':
		x = x + 1
	else:
		x = x - 1
	i = i + 1
print(x)


n = input()
i = 0
x = 0
while i < int(n):
	if input().find('+') + 1:
		x += 1
	else:
		x -= 1
	i += 1
print(x)


n = int(input())
l = []
x_value = 0
for i in range(n):
	j = input()
	l.append(j)
for i in l:
	if i == 'X++' or i == '++X':
		x_value += 1
	elif i == 'X--' or i == '--X':
		x_value -= 1
print(x_value)


n = int(input())
d = 0
for _ in range(n):
	s = str(input())
	if '++' in s:
		d = d + 1
	elif '--' in s:
		d = d - 1
	else:
		print(d)
print(d)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
n = inp()
x = 0
for i in range(n):
	s = insr()
	if '+' in s:
		x += 1
	else:
		x -= 1
print(x)


x = 0
statements = int(input())
for i in range(statements):
	curr_statement = input()
	if curr_statement in ['++X', 'X++']:
		x += 1
	elif curr_statement in ['--X', 'X--']:
		x -= 1
print(x)


n = int(input())
x = 0
for p in range(0, n):
	pos = 0
	neg = 0
	s = input()
	l = list(s)
	for i in range(0, 3):
		if l[i] == '+':
			pos = pos + 1
		elif l[i] == '-':
			neg = neg + 1
	if pos == 2:
		x = x + 1
	elif neg == 2:
		x = x - 1
print(x)


n = int(input())
p = 0
z = 0
for i in range(0, n):
	a = str(input())
	if a[1] == '+':
		p += 1
	else:
		z += 1
print(p - z)


n = int(input())
l = []
c = 0
for i in range(n):
	l.append(input())
for i in l:
	if i == '++X' or i == 'X++':
		c = c + 1
	elif i == '--X' or i == 'X--':
		c = c - 1
print(c)


t = int(input())
cp = 0
cn = 0
for i in range(t):
	op = input()
	for c in op:
		if c == '+':
			cp += 1
			break
		elif c == '-':
			cn += 1
			break
print(cp - cn)


try:
	t = int(input())
	x = 0
	for i in range(t):
		k = input()
		if k[0] == '+' or k[1] == '+':
			x += 1
		else:
			x -= 1
	print(x)
except:
	pass


inp = int(input())
i = 0
value = 0
while i < inp:
	inputs = str(input())
	poscounter = 0
	negcounter = 0
	for symbol in inputs:
		if symbol == '+':
			poscounter += 1
			if poscounter == 2:
				value += 1
		elif symbol == '-':
			negcounter += 1
			if negcounter == 2:
				value -= 1
	i += 1
print(value)


n = int(input())
temp = 0
for i in range(1, n + 1):
	Operation = input()
	if Operation == 'x++' or Operation == 'X++':
		temp += 1
	if Operation == 'x--' or Operation == 'X--':
		temp -= 1
	if Operation == '--x' or Operation == '--X':
		temp -= 1
	if Operation == '++x' or Operation == '++X':
		temp += 1
print(temp)


n = int(input())
arr = []
for _ in range(n):
	arr.append(input())
x = 0
for string in arr:
	if string[1] == '-':
		x -= 1
	elif string[1] == '+':
		x += 1
print(x)


X = 0
for i in range(int(input())):
	op = input()
	X = (X - 1, X + 1)[op.find('+') != -1]
print(X)


sum = 0
for i in range(int(input())):
	for c in input():
		if c == '+':
			sum += 1
			break
		elif c == '-':
			sum -= 1
			break
print(sum)


def main():
	x = 0
	add = ['++X', 'X++']
	sub = ['--X', 'X--']
	statements = []
	num_statements = int(input(''))
	for i in range(0, num_statements):
		statement = input('')
		statements.append(statement)
	for s in statements:
		if s in add:
			x += 1
		elif s in sub:
			x -= 1
	print(x)
main()


a = int(input())
bit = 0
for i in range(a):
	s = input()
	if s[0] == '-' and s[1] == '-' or (s[1] == '-' and s[2] == '-') or (s[0] == '-' and s[1] == '-'):
		bit -= 1
	elif s[0] == '+' and s[1] == '+' or (s[1] == '+' and s[2] == '+') or (s[0] == '+' and s[1] == '+'):
		bit += 1
print(bit)


t = int(input())
ans = 0
for _ in range(t):
	s = input()
	if s[0] == '-' or s[2] == '-':
		ans -= 1
	else:
		ans += 1
print(ans)


z = int(input())
ans = 0
for y in range(z):
	string = input()
	if '++' in string:
		ans = ans + 1
	else:
		ans = ans - 1
print(ans)


n = int(input())
x = 0
xx = 1
while xx < n + 1:
	woc = str(input())
	if woc == '++X' or woc == 'X++':
		x = x + 1
	else:
		x = x - 1
	xx = xx + 1
print(int(x))


n = int(input().strip())
m = [input().split() for i in range(n)]
x = 0
for i in m:
	for j in i:
		if j[:2] == '++' or j[1:] == '++':
			x += 1
		elif j[:2] == '--' or j[1:] == '--':
			x -= 1
print(x)


x = 0
for _ in [0] * int(input()):
	line = str(input())
	if '++' in line:
		x += 1
	elif '--' in line:
		x -= 1
print(x)


x = 0
lines = int(input())
for _ in range(lines):
	line = input()
	if '++' in line:
		x += 1
		continue
	if '--' in line:
		x -= 1
		continue
print(x)


n = int(input())
value = 0
for _ in range(n):
	a = input()
	if '+' in a:
		value += 1
	elif '-' in a:
		value -= 1
print(value)


T = int(input())
x = 0
for t in range(T):
	seq = input()
	if seq == '++X' or seq == 'X++':
		x += 1
	elif seq == '--X' or seq == 'X--':
		x -= 1
print(x)


x = 0
for i in range(int(input())):
	x -= (-1) ** ('+' in input())
print(x)


n = int(input())
x = 0
for i in range(n):
	line = input()
	if '++' in line:
		x += 1
	elif '--' in line:
		x -= 1
	else:
		print('whoops')
print(x)


def main():
	x = 0
	n = int(input().strip())
	for i in range(n):
		statement = input()
		if statement[0] == 'X':
			operation = statement[1:3]
			if operation == '++':
				x += 1
			else:
				x -= 1
		elif statement[2] == 'X':
			operation = statement[0:2]
			if operation == '++':
				x += 1
			else:
				x -= 1
	print(x)
main()


y = int(input())
lst = []
n = 0
for i in range(0, y):
	lst.insert(i, input())
for x in lst:
	if x == 'X++' or x == '++X':
		n += 1
	else:
		n -= 1
print(n)


n = int(input())
x = 0
i = 0
while i < n:
	st = input()
	if st[1] == '+':
		x += 1
	else:
		x -= 1
	i += 1
print(x)


def main():
	x = 0
	n = int(input())
	the_list = []
	for m in range(n):
		the_string = input()
		the_list.append(the_string)
	for p in the_list:
		if p == '++X' or p == 'X++':
			x += 1
		elif p == '--X' or p == 'X--':
			x -= 1
	print(x)
main()


n = int(input())
c = 0
for i in range(0, n):
	k = input()
	if k[0] == '+' or k[2] == '+':
		c += 1
	else:
		c -= 1
print(c)


x = int(input())
d = 0
for i in range(x):
	b = str(input())
	if ('X++' == b) == True or ('+X+' == b) == True or ('++X' == b) == True:
		d += 1
	if ('X--' == b) == True or ('-X-' == b) == True or ('--X' == b) == True:
		d -= 1
print(d)


x = 0
for i in range(int(input())):
	oper = input()
	if '++' in oper:
		x += 1
	elif '--' in oper:
		x += -1
print(x)


n = int(input())
val = 0
for i in range(n):
	cmd = input()
	if '+' in cmd:
		val += 1
	elif '-' in cmd:
		val -= 1
print(val)


step = int(input())
value = 0
for i in range(step):
	temp = input()
	if '--' in temp:
		value -= 1
	elif '++' in temp:
		value += 1
print(value)


z = int(input())
y = 0
for a in range(z):
	s = str(input())
	if s.find('++') != -1:
		y = y + 1
	elif s.find('--') != -1:
		y = y - 1
print(y)


n = int(input())
c = 0
for i in range(n):
	x = input()
	if x == '++X':
		c += 1
	if x == 'X++':
		c = c
		c += 1
	if x == '--X':
		c -= 1
	if x == 'X--':
		c = c
		c -= 1
print(c)


n = int(input())
ans = 0
while n:
	t = input()
	if t == '++X' or t == 'X++':
		ans = ans + 1
	else:
		ans = ans - 1
	n = n - 1
print(ans)


num_lines = int(input())
count = 0
for i in range(0, num_lines):
	line = input()
	if '+' in line:
		count += 1
	else:
		count -= 1
print(count)


t = int(input())
cn = 0
cp = 0
for i in range(t):
	p = input()
	if p == '--X' or p == 'X--':
		cn = cn + 1
	else:
		cp = cp + 1
k = cp - cn
print(k)


k = int(input())
count = 0
for i in range(k):
	nums = input()
	if nums == 'X++' or nums == '++X':
		count = count + 1
	elif nums == 'X--' or nums == '--X':
		count = count - 1
print(count)


n = int(input())
c = 0
for j in range(n):
	op = str(input())
	for i in op:
		if i == '+':
			c += 1
			break
		elif i == '-':
			c -= 1
			break
print(c)


m = {'++X': 1, 'X++': 1, '--X': -1, 'X--': -1}
x = int(input())
r = 0
for __ in range(x):
	i = input()
	v = m[i]
	r += v
print(r)


n = int(input())
stmts = list(map(lambda x: x.replace('X', ''), [input() for i in range(n)]))
x = 0
for stmt in stmts:
	x += 1 if stmt == '++' else -1
print(x)


n = int(input())
x = n
print(x - sum((2 for i in range(n) if input()[1] == '-')))


t = int(input())
c = 0
for i in range(t):
	a = input()
	if a == '++X':
		c += 1
	if a == 'X++':
		c += 1
	if a == 'X--':
		c = c - 1
	if a == '--X':
		c = c - 1
print(c)


n = int(input())
a = 0
while n > 0:
	n -= 1
	if '+' in input():
		a += 1
	else:
		a -= 1
print(a)


n = int(input())
lst = []
for i in range(n):
	c = input()
	lst.append(c)
print(lst.count('X++') + lst.count('++X') - lst.count('X--') - lst.count('--X'))


import sys

def Q4(string):
	x = 0
	if '++' in string:
		x += 1
	elif '--' in string:
		x -= 1
	return x
res = 0
n = int(sys.stdin.readline().strip())
for i in range(n):
	line = sys.stdin.readline().strip()
	res += Q4(line)
print(res)


in1 = int(input())
s = 0
for i in range(in1):
	in2 = input()
	if in2 == 'X++' or in2 == '++X':
		s = s + 1
	else:
		s = s - 1
print(s)


import math

def sumofno(n):
	summ = 0
	while n > 0:
		summ += n % 10
		n //= 10
	return summ

def get_key(val, lis):
	for (key, value) in lis.items():
		if value == val:
			return key

def isprime(val):
	c = 0
	for j in range(2, val):
		if val % j == 0:
			return False
	return True
try:
	ans = []
	for i in range(1):
		n = int(input())
		x = 0
		for j in range(n):
			a = input()
			if '++' in a:
				x += 1
			else:
				x -= 1
		ans.append(x)
	for an in ans:
		print(an)
except:
	pass


q = int(input())
x = 0
for i in range(0, q):
	w = input()
	if '+' in w:
		x += 1
	else:
		x -= 1
print(x)


n = int(input(''))
i = 0
x = 0
while i < n:
	something = input('')
	i = i + 1
	if something == 'X++' or something == '++X':
		x = x + 1
	else:
		x = x - 1
print(x)


x = int()
i = int(input())
while i:
	i -= 1
	operation = input()
	if '++' in operation:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
while n > 0:
	m = str(input())
	if m.find('++') >= 0:
		x += 1
	else:
		x -= 1
	n -= 1
print(x)


x = 0
for i in range(int(input())):
	op = list(input())
	if '+' in op:
		x += 1
	else:
		x -= 1
print(x)


x = 0
y = int(input())
for w in range(0, y):
	z = input()
	if z == '++X':
		x = x + 1
	elif z == 'X++':
		x = x + 1
	else:
		x = x - 1
print(x)


n = int(input())
k = 0
d = {'-': -1, '+': 1}
for _ in range(n):
	k += d[input()[1]]
print(k)


integer = int(input())
x = 0
for i in range(integer):
	newStr = input()
	if newStr[0] == '+' or newStr[len(newStr) - 1] == '+':
		x = x + 1
	elif newStr[0] == '-' or newStr[len(newStr) - 1] == '-':
		x = x - 1
print(x)


number = int(input())
k = 0
x = 0
while k < number:
	pep = input()
	if pep == '++X' or pep == 'X++':
		x += 1
	else:
		x -= 1
	k += 1
print(x)


token = input()
X = 0
for i in range(int(token)):
	oper = input()
	if '+' in oper:
		X += 1
	else:
		X -= 1
print(X)


n = int(input())
x = 0
for _ in range(n):
	string = input()
	if '++' in string:
		x += 1
	if '--' in string:
		x -= 1
print(x)


x = 0
for _ in [0] * int(input()):
	word = input()
	if word[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


x = 0
a = ['++X', '--X', 'X++', 'X--']
n = int(input())
while n != 0:
	line = input()
	if line in a:
		if line == a[2]:
			x += 1
		elif line == a[0]:
			x += 1
		elif line == a[1]:
			x -= 1
		elif line == a[3]:
			x -= 1
	else:
		pass
	n -= 1
print(x)


N = int(input())
li = []
x = 0
for i in range(0, N):
	strr = ' '
	strr = str(input())
	li.append(strr)
for i in range(0, N):
	if li[i] == 'X++' or li[i] == '++X':
		x += 1
	elif li[i] == 'X--' or li[i] == '--X':
		x -= 1
print(x)


n = int(input())
l = []
origin = 0
for i in range(n):
	l.append(input())
for item in l:
	if item == '++X' or item == 'X++':
		origin = origin + 1
	elif item == '--X' or item == 'X--':
		origin = origin - 1
print(origin)


n: int = int(input())
l: str = []
x = 0
for _ in range(n):
	l.append(input())
for e in l:
	if '+' in e:
		x += 1
	elif '-' in e:
		x -= 1
print(x)


n = int(input())
l = [0] * n
for i in range(n):
	l[i] = input()
posetive = 0
negative = 0
for i in l:
	if i == '++X' or i == 'X++':
		posetive += 1
	elif i == 'X--' or i == '--X':
		negative += 1
if negative > posetive:
	print(-1 * (negative - posetive))
elif posetive > negative:
	print(posetive - negative)
else:
	print(0)


def solve():
	statements = []
	for i in range(int(input())):
		statement = input()
		statements.append(statement)
	x = 0
	for statement in statements:
		if statement == 'X++' or statement == '++X':
			x += 1
		else:
			x -= 1
	return x
print(solve())


c = 0
for _ in range(int(input())):
	if '++' in input():
		c += 1
	else:
		c -= 1
print(c)


from sys import stdin
o = [l.rstrip() for l in stdin.readlines()][1:]
print(sum((1 if x[1] == '+' else -1 for x in o)))


i = input()
l = []
x = 0
for d in range(0, int(i)):
	m = input()
	l.append(m)
for g in l:
	if g == '++X' or g == 'X++':
		x += 1
	elif g == '--X' or g == 'X--':
		x -= 1
print(x)


X = 0
for _ in range(int(input())):
	s = list(input())
	if '+' in s:
		X += 1
	else:
		X -= 1
print(X)


n = int(input())
x = 0
for _ in range(n):
	l = input()
	if l == 'X++':
		x += 1
	elif l == '++X':
		x += 1
	elif l == '--X':
		x -= 1
	elif l == 'X--':
		x -= 1
print(x)


t = int(input())
count = 0
while t:
	s = input()
	if s[0] == '+' or s[1] == '+':
		count = count + 1
	else:
		count = count - 1
	t = t - 1
print(count)


length = int(input())
value = 0
for x in range(length):
	word = input()
	if '++' in word:
		value += 1
	else:
		value -= 1
print(value)


plus1 = 'X++'
plus2 = '++X'
minus1 = 'X--'
minus2 = '--X'

def small(s1, x1):
	if s1 == plus1 or s1 == plus2:
		x1 = x1 + 1
	elif s1 == minus1 or s1 == minus2:
		x1 = x1 - 1
	return x1
t = int(input())
x1 = 0
for i in range(t):
	s1 = input()
	x1 = small(s1, x1)
print(x1)


x = 0
for _ in range(int(input())):
	w = input()
	x = x + 1 if w[0] == '+' or w[len(w) - 1] == '+' else x - 1
print(x)


N = int(input())
x = 0
for n in range(N):
	K = str(input())
	if '+' in K:
		x = x + 1
	else:
		x = x - 1
print(x)


t = int(input())
x = 0
while t != 0:
	eqtn = input()
	if eqtn == 'X++' or eqtn == '++X':
		x = x + 1
	else:
		x = x - 1
	t = t - 1
print(x)


userinput = input()
X = 0
oplist = list()
for i in range(int(userinput)):
	opinput = input()
	z = oplist.append(opinput)
for t in range(len(oplist)):
	operator = oplist[t]
	if operator[1] == '+' and operator[2] == '+' or (operator[0] == '+' and operator[1] == '+'):
		X += 1
	if operator[1] == '-' and operator[2] == '-' or (operator[0] == '-' and operator[1] == '-'):
		X -= 1
print(X)


N = int(input())
count = 0
for i in range(N):
	a = input()
	mass = list(a)
	if mass[0] == '+' and mass[1] == '+' and (mass[2] == 'X'):
		count += 1
	elif mass[0] == 'X' and mass[1] == '+' and (mass[2] == '+'):
		count += 1
	elif mass[0] == '-' and mass[1] == '-' and (mass[2] == 'X'):
		count -= 1
	elif mass[0] == 'X' and mass[1] == '-' and (mass[2] == '-'):
		count -= 1
print(count)


n = int(input())
val = 0
for i in range(0, n):
	string = input()
	operand = string[1]
	if operand == '+':
		val += 1
	else:
		val -= 1
print(val)


def count(l):
	plus = 0
	minus = 0
	for i in l:
		for a in i:
			if a == '+':
				plus += 1
			elif a == '-':
				minus += 1
	c = plus // 2 - minus // 2
	return c
n = int(input())
l = []
for _ in range(n):
	l.append(input())
print(count(l))


n = int(input())
x = 0
plus = '++'
minus = '--'
for i in range(n):
	opera = input()
	if plus in opera:
		x += 1
	elif minus in opera:
		x -= 1
print(x)


n = int(input())
x = 0
op = {'m': '--', 'p': '++'}
for _ in range(n):
	exp = input()
	xpos = exp.index('X')
	if op['m'] in exp:
		x -= 1
	elif op['p'] in exp:
		x += 1
print(x)


n = int(input())
ans = 0
for i in range(n):
	to_do = input().strip('X')
	if to_do == '++':
		ans += 1
	elif to_do == '--':
		ans -= 1
	else:
		exit(100500)
print(ans)


def bit(a):
	x = 0
	for i in a:
		if '+' in i:
			x += 1
		else:
			x -= 1
	print(x)
count = int(input())
ar = []
for _ in range(count):
	ar.append(input())
bit(ar)


x = 0
n = int(input())
m = []
k = []
while n > len(m):
	k = list(input())
	m.append(k)
	if k[0] == '+' or k[-1] == '+':
		x = x + 1
	if k[0] == '-' or k[-1] == '-':
		x = x - 1
print(x)


n = int(input())
x = 0
for k in range(n):
	statement = input().upper()
	if statement == '++X' or statement == 'X++':
		x += 1
	elif statement == '--X' or statement == 'X--':
		x -= 1
print(x)


import sys
finish = 0
n = 0
for l in sys.stdin:
	if n != 0:
		tL = []
		for k in l:
			tL.append(k)
		tL.pop()
		if tL[1] == '+':
			finish = finish + 1
		elif tL[1] == '-':
			finish = finish - 1
	else:
		n = n + 1
print(finish)


X = 0
n = int(input())
for i in range(n):
	inpt = input()
	if inpt[1] == '+':
		X += 1
	elif inpt[1] == '-':
		X -= 1
	else:
		pass
print(X)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	n = I()
	x = 0
	for _ in range(n):
		s = S()
		if '+' in s:
			x += 1
		elif '-' in s:
			x -= 1
	return x
print(main())


n = int(input())
output = 0
for i in range(n):
	oper = str(input())
	if oper == '++X' or oper == 'X++':
		output += 1
	else:
		output -= 1
print(int(output))


def solution(a):
	c = 0
	for i in range(len(a)):
		if a[i] == 'X++' or a[i] == '++X':
			c += 1
		elif a[i] == '--X' or a[i] == 'X--':
			c -= 1
	print(c)
l = []
for i in range(int(input())):
	l.append(input())
solution(l)


n = int(input())
count = 0
for i in range(1, n + 1):
	d = input()
	if d == 'X++' or d == '++X':
		count += 1
	elif d == 'X--' or d == '--X':
		count -= 1
	else:
		count += 0
print(count)


n = input()
x = 0
for i in range(0, int(n)):
	inp = input()
	if inp == '++X':
		x += 1
	elif inp == '--X':
		x -= 1
	elif inp == 'X++':
		x += 1
	elif inp == 'X--':
		x -= 1
print(x)


def can(alist):
	m = 0
	for each in alist:
		if each == '+':
			m += 1
	if m >= 2:
		return True
	else:
		return False
a = int(input())
t = 0
while a > 0:
	b = list(input())
	if can(b):
		t += 1
	else:
		t -= 1
	a -= 1
print(t)


rounds = int(input())
c = 1
output = 0
while c <= rounds:
	if '+' in input():
		output += 1
	else:
		output -= 1
	c += 1
print(output)


n = int(input())
i = 0
result = 0
while i < n:
	a = input()
	if a[1] == '+':
		result += 1
	else:
		result -= 1
	i += 1
print(result)


n = int(input())
data = 0
while n > 0:
	p = input()
	if p[1] == '+':
		data = data + 1
	else:
		data = data - 1
	n = n - 1
print(data)


n = int(input())
c = 0
while n:
	n -= 1
	l = list(input())
	if l[0] == 'X':
		if l[1] == '+':
			c += 1
		else:
			c -= 1
	elif l[0] == '+':
		c += 1
	else:
		c -= 1
print(c)


x = input()
x = int(x)
Counter = 0
while x:
	s = input()
	if s == 'X++' or s == '++X':
		Counter += 1
	else:
		Counter -= 1
	x -= 1
print(Counter)


n = int(input())
x = 0
for k in range(n):
	command = input()
	if command == '++X' or command == 'X++':
		x += 1
	else:
		x -= 1
print(x)


def operation(statement):
	if statement[:2] == '++' or statement[-2:] == '++':
		return 'add'
	elif statement[:2] == '--' or statement[-2:] == '--':
		return 'subtract'
	else:
		return 'error'
count = int(input())
x = 0
for i in range(count):
	statement = input()
	if operation(statement) == 'add':
		x += 1
	elif operation(statement) == 'subtract':
		x -= 1
	else:
		pass
print(x)


n = int(input())
l = []
x = 0
for i in range(n):
	op = input()
	l.append(op)
for i in l:
	if i[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for _ in range(n):
	inp = input()
	if inp == 'X++' or inp == '++X':
		x += 1
	else:
		x = x - 1
print(x)


import sys
n = int(input())
i = 0
res = 0
while i < n:
	s = input()
	if s[1] == '+':
		res = res + 1
	else:
		res = res - 1
	i = i + 1
print(res)


r = 0
for i in range(int(input())):
	s = input()
	if s == 'X++' or s == '++X':
		r += 1
	elif s == 'X--' or s == '--X':
		r -= 1
	else:
		continue
else:
	print(r)


n = int(input())
x = 0
while n > 0:
	p = input()
	if p[0] == '+' or p[1] == '+':
		x += 1
	else:
		x -= 1
	n -= 1
print(x)


total_operations = int(input())
x = 0
for i in range(total_operations):
	operator = input()
	if operator == '++X' or operator == 'X++':
		x = x + 1
	if operator == '--X' or operator == 'X--':
		x = x - 1
print(int(x))


n = int(input())
count = 0
for i in range(n):
	s = input()
	for j in s:
		if j == '+':
			count += 1
			break
		elif j == '-':
			count -= 1
			break
print(count)


a = int(input())
tot1 = 0
tot2 = 0
while 1:
	if tot1 < a:
		tot1 += 1
		list1 = list(input())
		if '+' in list1:
			tot2 += 1
		if '-' in list1:
			tot2 -= 1
	else:
		break
print(tot2)


n = int(input())
results = []
x = 0
for _ in range(n):
	s = input()
	if s[0] == '+' or s[-1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for k in range(n):
	sent = input()
	if '-' in sent:
		x -= 1
	if '+' in sent:
		x += 1
print(x)


statements = int(input())
x = 0
result = []
if statements >= 1 and statements <= 150:
	for x in range(statements):
		operation = input()
		if operation == '++x' or operation == '++X' or operation == 'x++' or (operation == 'X++'):
			result.append(1)
		elif operation == '--x' or operation == '--X' or operation == 'x--' or (operation == 'X--'):
			result.append(-1)
	print(sum(result))


tests = int(input())
x = 0
for i in range(tests):
	text = input()
	if '+' in text:
		x += 1
	if '-' in text:
		x -= 1
print(x)


n = int(input())
ls = []
count = 0
for i in range(n):
	word = input()
	ls.append(word)
for j in range(0, len(ls)):
	if ls[j] == 'X++' or ls[j] == '++X':
		count += 1
	elif ls[j] == 'X--' or ls[j] == '--X':
		count -= 1
	j += 1
print(count)


x = int(input())
c = 0
for i in range(x):
	p = input()
	for j in p:
		if j == '+':
			c += 1
			break
		if j == '-':
			c = c - 1
			break
print(c)


n = int(input())
code = []
for i in range(n):
	code.append(input())
x = 0
for item in code:
	if item == '++X' or item == 'X++':
		x += 1
	elif item == '--X' or item == 'X--':
		x -= 1
print(int(x))


n = input()
n = int(n)
x = 0
for ans in range(n):
	m = input()
	if m == 'X++':
		x = x + 1
	if m == 'X--':
		x = x - 1
	if m == '++X':
		x = x + 1
	if m == '--X':
		x = x - 1
print(x)


n = int(input())
count = 0
for i in range(n):
	s = input()
	if s.find('++') != -1:
		count = count + 1
	else:
		count = count - 1
print(count)


i = 0
ops = int(input())
for o in range(ops):
	op = input()
	if '++' in op:
		i += 1
	elif '--' in op:
		i -= 1
print(i)


n = int(input())
t = []
for i in range(n):
	t.append(input() + '\n')
s = ''.join(t)
print((s.count('+') - s.count('-')) // 2)


num = int(input())
x = 0
for it in range(num):
	operation = str(input())
	if operation == '++X' or operation == 'X++':
		x += 1
	else:
		x -= 1
print(x)


x0 = int(input())
count1 = 0
count2 = 0
count4 = 0
for i in range(1, 151):
	if i <= x0:
		x1 = str(input())
		count1 = int(x1.count('+')) / 2
		count2 = int(x1.count('-')) / 2
		count3 = +count1 - count2
		count4 = count4 + count3
print(int(count4))


x = 0
n = int(input())
b = []
while n > 0:
	a = input()
	b.append(a)
	n -= 1
string = ''.join(b)
y = string.count('--')
z = string.count('++')
print(x - y + z)


işlemSayisi = int(input(''))
sayi = 0
i = 1
while i <= işlemSayisi:
	işlem = input('')
	if '++' in işlem:
		sayi += 1
	elif '--' in işlem:
		sayi -= 1
	i += 1
print(sayi)


n = int(input())
s = 0
for i in range(n):
	k = input()
	a = list(k)
	for ele in a:
		if ele == '+':
			s += 1
			break
		if ele == '-':
			s -= 1
			break
print(s)


n = int(input())
count = 0
for i in range(n):
	s = input()
	if s == 'X++' or s == '++X':
		count += 1
	elif s == '--X' or s == 'X--':
		count -= 1
	else:
		break
print(count)


n = int(input())
x = 0
for i in range(0, n):
	s = list(input())
	if s[1] == '-':
		x = x - 1
	if s[1] == '+':
		x = x + 1
print(x)


n = int(input())
x = 0
for q in range(n):
	st = input()
	if st[0] == 'X':
		if st[1] == '+':
			x_prev = x
			x += 1
		elif st[1] == '-':
			x_prev = x
			x -= 1
	elif st[0] == '+':
		x += 1
	elif st[0] == '-':
		x -= 1
print(x)


number_of_problems = int(input())
value = 0
for _ in range(0, number_of_problems):
	statement = input()
	for char in statement:
		if char == '+':
			value += 1
			break
		if char == '-':
			value -= 1
			break
print(value)


x = int(input())
y = list()
X = 0
for i in range(x):
	y.append(input())
for i in y:
	if '+' in i:
		X += 1
	elif '-' in i:
		X -= 1
print(X)


n = input()
l = []
count = 0
for i in range(int(n)):
	l.append(input())
for i in l:
	if i == 'X--' or i == '--X':
		count -= 1
	if i == 'X++' or i == '++X':
		count += 1
print(count)


ops = int(input())
result = 0
for i in range(ops):
	if '+' in input():
		result += 1
	else:
		result -= 1
print(result)


res = 0
for o in range(int(input())):
	a = input()
	if '+' in a:
		res += 1
	else:
		res -= 1
print(res)


number = int(input())
X = 0
for i in range(number):
	bit = str(input())
	if bit == '++X' or bit == 'X++':
		X = X + 1
	elif bit == '--X' or bit == 'X--':
		X = X - 1
print(X)


n = int(input())
i = 0
s = 0
while i < n:
	a = input()
	if a == 'X++' or a == '++X':
		a = 1
		s = s + a
		i += 1
	elif a == 'X--' or a == '--X':
		a = -1
		s = s + a
		i += 1
print(s)


suma = 0
testcase = int(input())
for i in range(testcase):
	a = input()
	if a == '++X' or a == 'X++':
		suma += 1
	else:
		suma -= 1
print(suma)


def main():
	lines = int(input())
	x = 0
	for i in range(lines):
		if input().count('+') == 2:
			x += 1
		else:
			x -= 1
	print(x)
main()


n = int(input())
i1 = 0
for i in range(n):
	i = input()
	t = i.find('++')
	t1 = i.find('--')
	if t > -1:
		i1 = i1 + 1
	if t1 > -1:
		i1 = i1 - 1
print(i1)


n = int(input())

def solve(n):
	X = 0
	for i in range(0, n):
		op = input()
		if op == '++X' or op == 'X++':
			X += 1
		if op == '--X' or op == 'X--':
			X -= 1
	print(X)
solve(n)


ans = 0
for _ in range(int(input())):
	ans += input()[1] == '+' or -1
print(ans)


num = int(input())
program = [input() for _ in range(num)]
x = 0
for op in program:
	if '++' in op:
		x += 1
	else:
		x -= 1
print(x)


def main():
	n = int(input())
	x = 0
	for _ in range(n):
		s = input()
		if s == 'X++' or s == '++X':
			x += 1
		else:
			x -= 1
	print(x)
main()


masukan = int(input(''))
angka = 0
while masukan > 0:
	inp = input('')
	for i in range(len(inp)):
		if inp[i:i + 2] == '++':
			angka += 1
			break
		elif inp[i:i + 2] == '--':
			angka -= 1
			break
	masukan -= 1
print(angka)


class Solution:

	def __init__(self):
		self.x = 0

	def solve(self, string):
		if '++' in string:
			self.x += 1
		else:
			self.x -= 1
		return
sol = Solution()
n = int(input().strip())
for i in range(n):
	string = input().strip()
	sol.solve(string)
print(sol.x)


n = int(input())
x = 0
for i in range(1, n + 1):
	s = list(input())
	a = s.count('+')
	b = s.count('-')
	if a == 2:
		x = x + 1
	else:
		x = x - 1
print(int(x))


q = int(input())
a = 0
for i in range(q):
	s = str(input())
	if s[1] == '+':
		a += 1
	else:
		a -= 1
print(a)


t = int(input())
ans = 0
while t:
	t = t - 1
	s = input()
	if (s[0] == '+') | (s[1] == '+') | (s[2] == '+'):
		ans = ans + 1
	else:
		ans = ans - 1
print(ans)


ans = 0
for i in range(int(input())):
	a = list(input())
	if a.count('-') == 2:
		ans -= 1
	else:
		ans += 1
print(ans)


n = int(input())
X = 0
d = []
for i in range(n):
	s = input()
	d.append(s)
for i in d:
	if i == '++X' or i == 'X++':
		X = X + 1
	elif i == '--X' or i == 'X--':
		X = X - 1
print(X)


n = int(input())
value = 0
for i in range(n):
	a = input()
	if a[1] == '+':
		value += 1
	else:
		value -= 1
print(value)


n = int(input())
ip = 0
im = 0
plus = ['++X', '+X+', 'X++']
minus = ['--X', '-X-', 'X--']
for i in range(n):
	a = input()
	if a in plus:
		ip += 1
	elif a in minus:
		im += 1
print(ip - im)


t = int(input())
val = 0
for i in range(t):
	data = input()
	if data == '++X' or data == 'X++':
		val += 1
	if data == 'X--' or data == '--X':
		val -= 1
print(val)


n_operations = int(input())
x = 0
for _ in range(n_operations):
	operation = input()
	if operation[0] == '+' or operation[2] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
ad = 0
su = 0
for _ in range(0, n):
	s = input()
	s = list(s)
	for i in s:
		if i == '+':
			ad += 1
			break
		elif i == '-':
			su += 1
			break
print(ad - su)


n = int(input())
op = list()
x = 0
for i in range(n):
	op.append(input())
for i in op:
	if i == 'X++' or i == '++X':
		x = x + 1
	else:
		x = x - 1
print(x)


n = int(input())
x = 0
for i in range(n):
	pass
	s = str(input())
	if '+' in s:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
ans = 0
for k in range(n):
	l = input()
	for i in range(3):
		if l[i] == '-':
			ans -= 1
			break
		elif l[i] == '+':
			ans += 1
			break
print(ans)


t = int(input())
ans = 0
while t > 0:
	t -= 1
	inp = str(input())
	if '+' in inp:
		ans += 1
	else:
		ans -= 1
print(ans)


num_of_statements = int(input())
X = 0
for i in range(num_of_statements):
	statement = input('')
	if 'X++' == statement or '++X' == statement:
		X += 1
	elif 'X--' == statement or '--X' == statement:
		X -= 1
print(X)


import sys
input = sys.stdin.readline
print = sys.stdout.write
lim = int(input())
res = 0
for i in range(lim):
	statement = str(input())
	if '++' in statement:
		res += 1
	elif '--' in statement:
		res -= 1
print(str(res))


__author__ = 'widoc'
l = []
for i in range(int(input())):
	l.append(input().strip('X'))
print(l.count('++') - l.count('--'))


count = 0

def bit_lang(text):
	global count
	if text[0].isalpha():
		if text[-1] == '+':
			count += 1
		else:
			count -= 1
	elif text[0] == '+':
		count += 1
	else:
		count -= 1
n = int(input())
for i in range(n):
	bit_lang(input())
print(count)


n = int(input())
x = 0
sentences = []
for i in range(n):
	sentence = input()
	a = [i for i in sentence]
	if '+' in a:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
while n != 0:
	string = input()
	ar = []
	for i in range(len(string)):
		ar.append(string[i])
		if ar[i] == '+':
			x += 1
			break
		elif ar[i] == '-':
			x -= 1
			break
		else:
			x = x
	n = n - 1
print(x)


a = int(input())
x = 0
for i in range(0, a):
	text = str(input())
	if text[:2] == '++' or text[1:] == '++':
		x = x + 1
	elif text[:2] == '--' or text[1:] == '--':
		x = x - 1
print(x)


n = int(input())
arr = ['none'] * n
res = 0
for i in range(n):
	arr[i] = input()
for i in range(n):
	if arr[i][1] == '+':
		res += 1
	else:
		res -= 1
print(res)


pos = int(input())
x = 0
for i in range(pos):
	s = input()
	if s[0] == '+' or s[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


input1 = input()
loop = int(input1)
X = 0
for count in range(0, loop):
	user_input = input()
	if user_input == '++X' or user_input == 'X++':
		X += 1
	else:
		X -= 1
print(X)


y = 0
for _ in range(int(input())):
	x = input()
	if x == 'X++' or x == '++X':
		y += 1
	elif x == 'X--' or x == '--X':
		y -= 1
print(y)


import math
n = int(input())
x = 0
for i in range(n):
	opr = input()
	if '+' in opr:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for c in range(n):
	command = input().lower()
	if command == 'x++' or command == '++x':
		x += 1
	elif command == 'x--' or command == '--x':
		x -= 1
	else:
		pass
print(x)


n = int(input())
x = 0
while n > 0:
	str = input()
	if '+' in str:
		x += 1
	elif '-' in str:
		x -= 1
	n -= 1
print(x)


n = int(input())
x = 0
for _ in range(n):
	stmt = input()
	if stmt[0] == '+' or stmt[0] == '-':
		if stmt[0:2] == '++':
			x += 1
		elif stmt[0:2] == '--':
			x -= 1
	elif stmt[0] == 'X':
		if stmt[1:3] == '++':
			x += 1
		elif stmt[1:3] == '--':
			x -= 1
print(x)


t = int(input())
c = 0
while t:
	t -= 1
	k = input().lower()
	if k == '++x' or k == 'x++':
		c += 1
	else:
		c -= 1
print(c)


n = int(input())
res = 0
str1 = '++X'
str2 = 'X++'
str3 = '--X'
str4 = 'X--'
for i in range(0, n):
	st = input()
	if st == str1 or st == str2:
		res = res + 1
	elif st == str3 or st == str4:
		res = res - 1
	else:
		pass
print(res)


n = int(input())
x = 0
i = 0
if 1 <= n <= 150:
	while i < n:
		a = [k for k in input()]
		if '+' in a:
			x += 1
		elif '-' in a:
			x -= 1
		i += 1
else:
	print('неправильное количество предложений')
print(x)


import string
n = int(input())
result = 0
for i in range(n):
	a = list(input())
	if '+' in a:
		result += 1
	else:
		result -= 1
print(result)


x = 0
for i in range(int(input(''))):
	exec(''.join(sorted(input('').lower())[::-1]).replace('x++', 'x+=1').replace('x--', 'x-=1'))
print(x)


numberX = int(input())
commandList = []
for i in range(0, numberX):
	tempInp = input()
	commandList.append(tempInp)
theVarX = 0
for i in commandList:
	if i == 'X++' or i == '++X':
		theVarX += 1
	else:
		theVarX -= 1
print(theVarX)


value = 0
add = '+'
sub = '-'
n = int(input())
for i in range(n):
	exp = input()
	if add in exp:
		value += 1
	else:
		value -= 1
print(value)


n = int(input())
num = 0
for i in range(n):
	str = input()
	if str == 'X++' or str == '++X':
		num = num + 1
	elif str == 'X--' or str == '--X':
		num = num - 1
	else:
		print('invalid input')
print(num)


x = 0
f1 = int(input())
for i in range(f1):
	f2 = input()
	if f2.count('++'):
		x += 1
	else:
		x -= 1
print(x)


t = int(input())
y = 0
for i in range(t):
	x = input()
	p = '++'
	m = '--'
	if p in x:
		y = y + 1
	elif m in x:
		y = y - 1
print(y)


a = int(input())
k = 0
for i in range(a):
	b = input()
	if '++' in b:
		k += 1
	elif '--' in b:
		k -= 1
print(k)


elem = int(input())
total = 0
for x in range(elem):
	temp = input()
	count = 0
	for x in range(len(temp)):
		if temp[x] == '+':
			count = count + 1
		elif temp[x] == '-':
			count = count - 1
	if count == 2:
		total = total + 1
	elif count == -2:
		total = total - 1
print(total)


n = input()
num = 0
for i in range(int(n)):
	seq = input()
	if seq.count('+') == 2:
		num = num + 1
	else:
		num = num - 1
print(num)


n = int(input())
x = i = 0
ops = []
while i < n:
	ops.append(input())
	if ops.count('X++') > 0 or ops.count('++X') > 0:
		x += 1
	else:
		x += -1
	ops.pop()
	i += 1
print(x)


n = int(input())
x = 0
for character in range(n):
	statement = input()
	if '++' in statement:
		x += 1
	elif '--':
		x -= 1
print(x)


n = eval(input())
x = 0
for i in range(n):
	s = input()
	if s[0] == '+' and s[1] == '+':
		x = x + 1
	if s[0] == '-' and s[1] == '-':
		x = x - 1
	if s[-1] == '-' and s[-2] == '-':
		x = x - 1
	if s[-1] == '+' and s[-2] == '+':
		x = x + 1
print(x)


n = int(input())
x = 0
for i in range(n):
	a = list(input())
	if a[0] == '+' or a[1] == '+':
		x += 1
	elif a[0] == '-' or a[1] == '-':
		x -= 1
print(x)


n = int(input())
add = 0
sub = 0
for i in range(0, n):
	s = input()
	if '+' in s:
		add += 1
	else:
		sub += 1
print(add - sub)


n = int(input())
z = y = 0
for i in range(n):
	a = input()
	if a.count('+') == 2:
		z += 1
	else:
		y += 1
print(z - y)


ans = 0
for _ in range(int(input())):
	l = str(input())
	if l[1] == '+':
		ans = ans + 1
	else:
		ans = ans - 1
print(ans)


a = int(input())
m = 0
while a > 0:
	a -= 1
	b = input()
	if b[0] == b[1] == '+' or b[2] == b[1] == '+':
		m += 1
	elif b[0] == b[1] == '-' or b[2] == b[1] == '-':
		m -= 1
print(m)


z = int(input())
list1 = []
x = 0
for i in range(0, z):
	list1.append(input())
for elm in list1:
	if elm == 'X++' or elm == '++X':
		x += 1
	else:
		x -= 1
print(x)


from sys import stdin

def readInts():
	return map(int, stdin.readline().strip().split())
out = 0
(n,) = readInts()
for _ in range(n):
	s = stdin.readline().strip()
	if s[1] == '+':
		out += 1
	else:
		out -= 1
print(out)


f = lambda : map(int, input().split())
n = int(input())
number = 0
for i in range(n):
	x = input()
	if x[0] == '+' or x[2] == '+':
		number += 1
	elif x[0] == '-' or x[2] == '-':
		number -= 1
print(number)


a = int(input())
c = 0
for i in range(a):
	b = input().split()
	if b[0].count('+') == 2:
		c += 1
	else:
		c -= 1
print(c)


value = 0
for _ in range(0, int(input())):
	x = str(input())
	plus = x.count('+')
	minus = x.count('-')
	if plus == 2:
		value += 1
	elif minus == 2:
		value -= 1
print(value)


x = 0
n = input()
n = int(n)
i = 0
l = list()
while i < n:
	p = input()
	l.append(p)
	i = i + 1
for j in l:
	if j == 'X++' or j == '++X':
		x = x + 1
	elif j == 'X--' or j == '--X':
		x = x - 1
print(x)


n = int(input())
x = 0
for i in range(n):
	p = 0
	t = 0
	c = input()
	for j in c:
		if j == '+':
			p += 1
		elif j == '-':
			t += 1
	if p >= 2:
		x += 1
	elif t >= 0:
		x -= 1
print(x)


def incdec(n, ar):
	a = 0
	for x in ar:
		if x == '++X' or x == 'X++':
			a += 1
		elif x == '--X' or x == 'X--':
			a -= 1
	print(a)
n = int(input())
ar = []
for _ in range(n):
	ar.append(input())
incdec(n, ar)


print(sum((input().count('+') - 1 for x in [0] * int(input()))))


n = int(input())
x = 0
for i in range(n):
	sta = input()
	a = 0
	for j in range(3):
		if sta[j] is '+':
			a += 1
		else:
			a = a
	if a > 0:
		x += 1
	else:
		x -= 1
print(int(x))


import sys
txt = sys.stdin.read().split('\n')
txt = txt[1:int(txt[0]) + 1]
value = 0
for statement in txt:
	if 'x' in statement.lower():
		if '++' in statement:
			value += 1
		else:
			value -= 1
print(str(value))


n = int(input())
x = 0
for i in range(n):
	a = input()
	b = sorted(a)
	if b[0] == b[1] == '+':
		x = x + 1
	elif b[0] == b[1] == '-':
		x = x - 1
print(x)


N = int(input())
num = 0
for i in range(N):
	sym = input()
	if sym[0] == '+':
		num += 1
	elif sym[-1] == '+':
		num += 1
	else:
		num -= 1
print(num)


n = int(input())
q = 0
for i in range(0, n):
	s = input()
	if ''.join(sorted(s)) == '++X':
		q += 1
	else:
		q -= 1
print(q)


def fun(n=int(input())):
	val = 0
	for i in range(n):
		ipt = input()
		if ipt == '++X' or ipt == 'X++':
			val += 1
		else:
			val -= 1
	print(val)
fun()


n = int(input())
a = 0
for x in range(n):
	c = input()
	if c == '++X' or c == 'X++':
		a += 1
	else:
		a -= 1
print(a)


x = int(input())
c = 0
count = 0
while c < x:
	oper = input()
	c += 1
	for i in oper:
		if i == '+':
			count += 0.5
		elif i == '-':
			count -= 0.5
print(int(count))


n = int(input())
x = 0
for _ in range(n):
	operation = input()
	if operation.count('+') != 0:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for i in range(n):
	message = input()
	for ch in message:
		if ch == '+':
			x += 0.5
		if ch == '-':
			x -= 0.5
print(int(x))


x = int(input())
y = list()
for i in range(x):
	z = input()
	y.append(z)
temp = 0
for i in range(x):
	if y[i] == 'X++' or y[i] == '++X':
		temp = temp + 1
	elif y[i] == '--X' or y[i] == 'X--':
		temp = temp - 1
print(temp)


n = int(input().strip())
n += 1
v = 0
for i in range(1, n):
	s = input().strip()
	if s == 'X++' or s == '++X':
		v += 1
	elif s == 'X--' or s == '--X':
		v -= 1
print(v)


x = 0
statements = int(input())
for _ in range(statements):
	statement = input()
	if '++' in statement:
		x += 1
	if '--' in statement:
		x -= 1
print(x)


x = 0
a1 = input()
n = int(a1)
for v in range(0, n):
	a2 = input()
	if a2 == 'X++' or a2 == '++X':
		x += 1
	if a2 == '--X' or a2 == 'X--':
		x -= 1
print(x)


x = 0
for _ in range(int(input())):
	op = input()
	if str(op).__contains__('+'):
		x += 1
	if str(op).__contains__('-'):
		x -= 1
print(x)


from sys import stdin
(lines, line_index) = (stdin.readlines(), -1)

def get_line():
	global lines, line_index
	line_index += 1
	return lines[line_index]

def main():
	n = int(get_line())
	x = 0
	for _ in range(n):
		l = get_line().strip()
		if '+' in l:
			x += 1
		else:
			x -= 1
	print(x)
main()


def init():
	num_lines = int(input())
	operations = list()
	x = 0
	for i in range(0, num_lines):
		operation = input()
		operations.append(operation)
	for operation in operations:
		if '++' in operation:
			x = x + 1
		elif '--' in operation:
			x = x - 1
	print(x)
init()


n_statements = int(input())
final_value = 0
for t in range(n_statements):
	s = input()
	if '+' in s:
		final_value += 1
	elif '-' in s:
		final_value -= 1
print(final_value)


count = 0
for i in range(int(input())):
	s = list(input())
	if s.count('-') > 0:
		count -= 1
	else:
		count += 1
print(count)


nbtest = int(input())
nb = 0
for k in range(nbtest):
	if '+' in input():
		nb += 1
	else:
		nb -= 1
print(nb)


import sys
inf = sys.stdin
T = inf.readline()
counter = 0
for i in range(int(T)):
	command = str(inf.readline()).strip()
	if '+' in command:
		counter += 1
	else:
		counter -= 1
print(counter)


z = int(input())
l = []
x = 0
for i in range(z):
	l.append(input())
for o in l:
	if '+' in o:
		x += 1
	elif '-' in o:
		x -= 1
print(x)


n = int(input())
x = 0
while n != 0:
	a = str(input())
	if a == '++X':
		x = x + 1
	elif a == '--X':
		x = x - 1
	elif a == 'X++':
		x = x + 1
	elif a == 'X--':
		x = x - 1
	n = n - 1
print(x)


x = 0
for _ in range(int(input())):
	str1 = input()
	if str1[0] == '+' or str1[1] == '+':
		x += 1
	elif str1[0] == '-' or str1[1] == '-':
		x -= 1
print(x)


x = 0
for i in range(int(input())):
	k = list(input())
	if ('+' in k) == True:
		x = x + 1
	else:
		x = x - 1
print(x)


import sys
b = sys.stdin.read()
print(b.count('++') - b.count('--'))


n = int(input())
l = []
t = 0
for i in range(n):
	a = input()
	if a == '++X' or a == 'X++':
		t += 1
	if a == '--X' or a == 'X--':
		t = t - 1
print(t)


n = int(input())
x = 0
for i in range(n):
	st = input()
	if st[0] == '+' or st[0] == '-':
		if st[0] == '+':
			x = x + 1
		else:
			x = x - 1
	elif st[1] == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


lst = []
for i in range(int(input())):
	lst.append(input().replace('--', '-').replace('++', '+').replace('X', ''))
s = '1'.join(lst) + '1'
print(eval(s))


def main():
	cases = int(input())
	X = 0
	for i in range(cases):
		info = input()
		if '--' in info:
			X -= 1
		else:
			X += 1
	print(X)
main()


x = 0
n = int(input())
if 1 <= n <= 150:
	for i in range(n):
		k = input()
		if k[1] == '+':
			x += 1
		else:
			x -= 1
print(x)


n = int(input())
count = 0
while n > 0:
	s = input()
	if s.__contains__('+'):
		count += 1
	else:
		count -= 1
	n -= 1
print(count)


x = 0
ang = int(input())
for i in range(ang):
	ind = str(input())
	ind = ind.upper()
	if ind[0] == '+' or ind[2] == '+':
		x += 1
	elif ind[0] == '-' or ind[2] == '-':
		x -= 1
print(x)


test_case = int(input())
count = 0
for _ in range(test_case):
	operation = input().strip()
	if operation == '++X' or operation == 'X++':
		count += 1
	if operation == '--X' or operation == 'X--':
		count -= 1
print(count)


num = int(input())
score = 0
for i in range(num):
	line = input()
	if line == '++X' or line == 'X++':
		score += 1
	else:
		score -= 1
print(score)


n = int(input())
y = 0
for x in range(n):
	x = input()
	if x[1] == '+':
		y += 1
	else:
		y = y - 1
print(y)


n = int(input())
val = 0
for _ in range(n):
	state = input()
	if '+' in state:
		val += 1
	if '-' in state:
		val -= 1
print(val)


c1 = 0
c2 = 0
a = int(input())
for i in range(a):
	x = input()
	if x == '++X' or x == 'X++':
		c1 = c1 + 1
print(c1 - (a - c1))


n = int(input())
answer = 0
for _ in range(n):
	t = input()
	if '++' in t:
		answer += 1
	elif '--' in t:
		answer -= 1
print(answer)


n = int(input())
X = 0
if 1 <= n and n <= 150:
	for i in range(n):
		i = input()
		if i == '++X' or i == 'X++':
			X += 1
		elif i == '--X' or i == 'X--':
			X -= 1
	print(X)
else:
	print('Nevernoe znach')


n = int(input())
x = 0
for i in range(n):
	operation = input()
	if operation == '++X' or operation == 'X++':
		x = x + 1
	elif operation == '--X' or operation == 'X--':
		x = x - 1
	else:
		pass
print(x)


number = int(input())
y = 0
for i in range(number):
	comment = input()
	if comment == '--X' or comment == 'X--':
		y -= 1
	else:
		y += 1
print(y)


temp = input()
n = int(temp)
i = 0
x = 0
while i < n:
	i += 1
	command = input()
	if '++' in command:
		x += 1
	elif '--' in command:
		x -= 1
print(x)


n = int(input())
x = 0
for i in range(n):
	sentence = list(map(str, input()))
	for j in range(len(sentence)):
		if sentence[j] == '+':
			x += 1
			break
		elif sentence[j] == '-':
			x -= 1
			break
print(x)


from collections import *
from math import *
from sys import *
n = int(input())
x = 0
for i in range(n):
	s = input()
	if s[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
count = 0
for i in range(n):
	k = input()
	ans = ''
	for i in range(len(k) - 1):
		ans = k[i] + k[i + 1]
		if ans == '++':
			count += 1
		elif ans == '--':
			count -= 1
print(count)


x = 0
number_of_lines = input()
number_of_lines = int(number_of_lines)
for random in range(0, number_of_lines):
	command = input()
	if command == '++X' or command == 'X++':
		x = x + 1
	else:
		x = x - 1
print(x)


n = int(input())
counter = 0
for i in range(n):
	str = input()
	if str[:2] == '++' or str[1:] == '++':
		counter += 1
	if str[:2] == '--' or str[1:] == '--':
		counter -= 1
print(counter)


n = int(input())
x = 0
for iter in range(n):
	line = input()
	if '++' in line:
		x = x + 1
	elif '--' in line:
		x = x - 1
print(x)


n = int(input())
ans = 0
plus = ['++X', 'X++']
minus = ['--X', 'X--']
while n:
	if input() in plus:
		ans += 1
	else:
		ans -= 1
	n -= 1
print(ans)


(num, ans) = (int(input()), 0)
for i in range(num):
	st = str(input())
	if '--' in st:
		ans -= 1
	else:
		ans += 1
print(ans)


n = int(input())
li = []
while n > 0:
	a = input()
	li.append(a)
	n -= 1
count = 0
for i in li:
	if i[1] == '+':
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
x = 0
for i in range(n):
	operation = input()
	if operation.count('+') == 2:
		x += 1
	elif operation.count('-') == 2:
		x -= 1
print(x)


n = int(input())
m = 0
for i in range(n):
	x = input()
	if '+' in x:
		m = m + 1
	elif '-' in x:
		m = m - 1
	else:
		print('You are wrong!')
print(m)


n = int(input())
L = []
X = 0
for e in range(n):
	L.append(input())
for i in L:
	if '+' in i:
		X += 1
	else:
		X -= 1
print(X)


n = int(input())
x = 0
c1 = 0
c2 = 0
while n != 0:
	n -= 1
	string = input()
	for i in range(len(string)):
		if string[i] == '+':
			c1 += 1
			break
		if string[i] == '-':
			c2 += 1
			break
	if c1:
		x += 1
		c1 = 0
	if c2:
		x -= 1
		c2 = 0
print(x)


x = 0
for z in range(0, int(input())):
	y = list(input())
	if y[1] == '-':
		x = x - 1
	else:
		x = x + 1
print(x)


input_n = int(input())
x = 0
for i in range(input_n):
	input_string = input()
	if input_string[1] == '-':
		x += -1
	else:
		x += 1
print(x)


n = int(input())
i = 0
x = 0
while i < n:
	b = set(input())
	if '+' in b:
		x += 1
	else:
		x += -1
	i += 1
else:
	print(x)


sum = 0
for i in range(int(input())):
	s = list(input())
	if '+' in s:
		sum = sum + 1
	elif '-' in s:
		sum = sum - 1
print(sum)


X = 0
s = int(input())
for i in range(s):
	m = str(input())
	if m == 'X++' or m == '++X':
		X = X + 1
	elif m == 'X--' or m == '--X':
		X = X - 1
print(X)


count = 0
for i in range(int(input())):
	bit = input()
	if '++' in bit:
		count += 1
	elif '--' in bit:
		count -= 1
print(count)


N = int(input())
n = 0
s = 0
while n < N:
	M = input()
	if M == '++X' or M == 'X++':
		s += 1
	elif M == '--X' or M == 'X--':
		s -= 1
	n += 1
print(s)


n = int(input())
x = 0
for i in range(n):
	a = list(input())
	if a[0] == 'X' and a[1] == '+':
		x = x + 1
	if a[0] == 'X' and a[1] == '-':
		x = x - 1
	if a[2] == 'X' and a[0] == '+':
		x = x + 1
	if a[2] == 'X' and a[0] == '-':
		x = x - 1
print(x)


n = int(input())
total = 0
for i in range(n):
	a = str(input())
	if '++' in a:
		total += 1
	elif '--' in a:
		total -= 1
print('{}'.format(total))


n = int(input())
d = 0
for i in range(n):
	x = str(input())
	if x == 'X++' or x == '++X':
		d = d + 1
	elif x == '--X' or x == 'X--':
		d = d - 1
print(d)


def bit_plus_plus():
	n_statements = int(input())
	x = 0
	for _ in range(0, n_statements):
		statement = str(input())
		if '+' in statement:
			x += 1
		if '-' in statement:
			x -= 1
	print(x)
bit_plus_plus()


def boom(arr):
	res = 0
	for x in arr:
		if x == '++X' or x == 'X++':
			res += 1
		elif x == '--X' or x == 'X--':
			res -= 1
	return res
arr = []
t = int(input())
for _ in range(t):
	x = input()
	arr.append(x)
print(boom(arr))


from math import *
n = int(input())
x = 0
for i in range(0, n):
	if input().find('-') != -1:
		x -= 1
	else:
		x += 1
print(x)


statements = []
nline = int(input())
for i in range(nline):
	line = input()
	statements.append(line)
x = int()
for statement in statements:
	if '++' in statement:
		x += 1
	else:
		x -= 1
print(x)


from sys import stdin
sequence = stdin.readlines()
result = 0
for i in range(1, len(sequence)):
	if '++' in sequence[i]:
		result += 1
	elif '--' in sequence[i]:
		result -= 1
print(result)


def bit(s):
	if '+' in s:
		return 1
	else:
		return -1
n = int(input())
r = 0
for i in range(n):
	r += bit(input())
print(r)


from math import floor

def main(status=int(0)):
	counter = 0
	for _ in range(int(input())):
		if input()[1] == '+':
			counter += 1
		else:
			counter -= 1
	print('{}'.format(counter))
	return status
main()


t = int(input())
sumr = []
for xx in range(t):
	n = input()
	sum = 0
	for i in n:
		if i == '+':
			sum += 1
		elif i == '-':
			sum -= 1
	sum /= 2
	sumr.append(sum)
s = 0
for to in sumr:
	s += to
print(int(s))


num_of_statements = int(input())
x = 0
for y in range(0, num_of_statements):
	statement = input()
	if '+' in statement:
		x += 1
	elif '-' in statement:
		x = x - 1
print(x)


t = int(input())
c = 0
for i in range(t):
	b = input()
	if b[0] == '+' or b[1] == '+':
		c += 1
	else:
		c -= 1
print(c)


n = int(input())
ans = 0
for i in range(0, n):
	str = input()
	if '+' in str:
		ans += 1
	elif '-' in str:
		ans -= 1
print(ans, sep='', end='\n')


x = 0
n = int(input())
for i in range(n):
	line = input()
	line = list(line)
	if '-' in line:
		x = x - 1
	else:
		x = x + 1
print(int(x))


n = int(input())
a = 1
X = 0
while a <= n:
	b = input()
	if b == '++X' or b == 'X++':
		X = X + 1
	elif b == '--X' or b == 'X--':
		X = X - 1
	a = a + 1
print(X)


n = input()
n = int(n)
x = 0
k = [] * 3
for i in range(n):
	k = str(input())
	if k[1] == '+':
		x = x + 1
	if k[1] == '-':
		x = x - 1
print(x)


n = int(input())
x = []
for i in range(n):
	x.append(input())
i = 0
for z in range(len(x)):
	if '++' in str(x[z]):
		i += 1
	elif '--' in str(x[z]):
		i = i - 1
print(i)


n = input()
sum = 0
for i in range(0, int(n)):
	a = input()
	if a[0] == '+' or a[1] == '+' or a[2] == '+':
		sum = sum + 1
	elif a[0] == '-' or a[1] == '-' or a[2] == '-':
		sum = sum - 1
print(sum)


(n, ans, b) = (int(input()), 0, [])

def str_to_list(a):
	y = []
	for i in range(len(a)):
		y.append(a[i])
	return y
for i in range(n):
	a = input()
	a1 = str_to_list(a)
	b.append(a1)
for i in range(n):
	if '+' in b[i]:
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
stat = []
va = 0
for i in range(n):
	stat.append(input())
for i in stat:
	if '++' in i:
		va = va + 1
	if '--' in i:
		va = va - 1
print(va)


m = int(input())
t = []
for i in range(m):
	t.append(input().strip('X'))
x = 0
for i in t:
	if i == '++':
		x += 1
	if i == '--':
		x += -1
print(x)


import sys
n = int(sys.stdin.readline().split()[0])
sentences = []
for line in sys.stdin:
	for word in line.split():
		sentences.append(word)
result = 0
for i in sentences:
	if i.find('++') != -1:
		result += 1
	else:
		result -= 1
print(result)


n = int(input())
c1 = 0
c2 = 0
for i in range(n):
	x = input()
	if x == '++X' or x == 'X++':
		c1 += 1
	else:
		c2 = c2 - 1
print(c1 + c2)


PLUS = ['++X', 'X++']
MINUS = ['--X', 'X--']

def solve_the_problem():
	n = int(input())
	res = 0
	for i in range(0, n):
		operation = input()
		if operation in PLUS:
			res += 1
		else:
			res -= 1
	print(res)
solve_the_problem()


x = 0

def solution(x, l):
	for elt in l:
		if elt == 'X++' or elt == '++X':
			x += 1
		elif elt == '--X' or elt == 'X--':
			x -= 1
	print(x)
n = int(input())
l = []
for i in range(n):
	l.append(input())
solution(x, l)


n = 0
t = int(input())
while t:
	s = input()
	if '+' in s:
		n += 1
	else:
		n -= 1
	t = t - 1
print(n)


n = int(input())
operations = []
for i in range(n):
	operations.append(input())
x = 0
for o in operations:
	if '-' in o:
		x -= 1
	elif '+' in o:
		x += 1
print(x)


n = int(input())
i = 0
p = 0
while i < n:
	i = i + 1
	m = input()
	if m == '++X' or m == 'X++':
		p = p + 1
	else:
		p = p - 1
print(p)


number_of_operations = int(input())
result = 0
number_last_time = 0
i = 0
for operations in range(0, number_of_operations):
	i += 1
	operation = input()
	if operation == 'X++':
		result += 1
	if operation == 'X--':
		result -= 1
	if operation == '++X':
		result += 1
		number_last_time = result
	if operation == '--X':
		result -= 1
		number_last_time = result
print(result)


def bit(n, seq):
	if seq[1] == '+':
		n += 1
	elif seq[1] == '-':
		n -= 1
	return n
s = int(input())
no = 0
for i in range(s):
	seq = input()
	no = bit(no, seq)
print(no)


n = int(input())
z = 0
while n > 0:
	l = input()
	if l == 'X++' or l == '++X':
		z = z + 1
	elif l == 'X--' or l == '--X':
		z = z - 1
	n = n - 1
print(z)


n = int(input())
a = []
j = 0
for i in range(n):
	a.append(str(input()))
for i in range(n):
	if a[i] == '++X' or a[i] == 'X++':
		j += 1
	else:
		j -= 1
print(j)


number = eval(input())
x = 0
for i in range(number):
	string = input()
	if string[0] == 'X':
		if string[1:] == '++':
			x += 1
		else:
			x -= 1
	elif string[:2] == '++':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
lst = [input() for i in range(n)]
for el in lst:
	x += 1 if '++' in el else -1
print(x)


counter = 0
a = int(input())
arr = []
for i in range(a):
	b = str(input())
	arr.append(b)
for elem in arr:
	if elem == 'X++' or elem == '++X':
		counter += 1
	else:
		counter -= 1
print(counter)


N = 0
T = int(input())
for _ in range(T):
	stat = input()
	if '+' in stat:
		N += 1
	else:
		N -= 1
print(N)


n = int(input())
X = 0
codelist = []
for i in range(n):
	codelist.append(input())
for i in range(n):
	if codelist[i] == 'X++':
		X += 1
	elif codelist[i] == '++X':
		X += 1
	else:
		X -= 1
print(X)


t = int(input())
x = 0
while t:
	t = t - 1
	l = input()
	if l[0] == '+' or l[1] == '+' or l[2] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for i in range(0, n):
	m = input().rstrip()
	if m == 'X++' or m == '++X':
		x = x + 1
	elif m == '--X' or m == 'X--':
		x = x - 1
print(x)


n = int(input())
p = 0
m = 0
for i in range(0, n):
	inp = input()
	p = p + 1 if inp == '++X' or inp == 'X++' else p
	m = m + 1 if inp == '--X' or inp == 'X--' else m
print(p - m)


n = int(input())
l = []
for x in range(0, n):
	a = input()
	l.append(a)
x = int(0)
for i in range(0, len(l)):
	if l[i] == '++X' or l[i] == 'X++':
		x += 1
	elif l[i] == '--X' or l[i] == 'X--':
		x -= 1
print(x)


sum = int(input().strip())
counter = 0
countertext = []
for i in range(sum):
	code = input()
	if code == '++X' or code == 'X++':
		counter += 1
	else:
		counter -= 1
print(counter)


t = int(input())
x = 0
for tc in range(t):
	s = input()
	if s == '++X' or s == 'X++':
		x = x + 1
	elif s == '--X' or s == 'X--':
		x = x - 1
print(x)


tc = int(input())
x = 0
for i in range(0, tc):
	string = input()
	if string in ['X++', '++X']:
		x = x + 1
	else:
		x = x - 1
print(x)


t = int(input())
c = 0
while t != 0:
	t -= 1
	s = input()
	if '+' in s:
		c += 1
	if '-' in s:
		c -= 1
print(c)


m = int(input())
ans = int(0)
for i in range(0, m):
	a = input()
	if a[1] == '+':
		ans = ans + 1
	else:
		ans = ans - 1
print(ans)


n = int(input())
l = []
m = 0
for i in range(n):
	l.append(input())
for i in range(n):
	p = l[i]
	if '+' in p:
		m = m + 1
	else:
		m = m - 1
print(m)


array = []
input_values = input()
initial_value_x = 0
for i in range(0, int(input_values)):
	array.append(input().split())
for words in array:
	teste = str(words)
	if '--' in teste:
		initial_value_x -= 1
	elif '++' in teste:
		initial_value_x += 1
	else:
		pass
print(initial_value_x)


n = int(input(''))
x = 0
for i in range(n):
	data = input('')
	if data[0:2] == '++' or data[1:3] == '++':
		x += 1
	elif data[0:2] == '--' or data[1:3] == '--':
		x -= 1
print(x)


bit = 0
cases = int(input())
for i in range(cases):
	if '++' in input():
		bit += 1
	else:
		bit -= 1
print(bit)


import re
n = int(input())
list = []
for i in range(n):
	list.append(input())
q = 0
x = 0
while True:
	s = list[q]
	if len(s.strip('-')) <= 2:
		x = x - 1
	else:
		x = x + 1
	q = q + 1
	if q >= n:
		print(x)
		break


x = int(input(''))
b = 0
while x > 0:
	y = input('')
	if y.lower() == '++x' or y.lower() == 'x++':
		b += 1
	elif y.lower() == '--x' or y.lower() == 'x--':
		b -= 1
	x -= 1
print(b)


num = int(input())
m = 0
M = 0
for i in range(num):
	l = input()
	if l == 'X++' or l == '++X':
		m += 1
	elif l == '--X' or l == 'X--':
		M += 1
print(m - M)


n = int(input())
sum = 0
for i in range(n):
	new = input()
	if new == '++X' or new == 'X++':
		sum += 1
	if new == '--X' or new == 'X--':
		sum -= 1
print(sum)


n = int(input())
x = 0
commands = []
for i in range(n):
	commands.append(input())
for j in commands:
	for k in range(len(j)):
		if j[k] == '+' and j[k + 1] == '+':
			x += 1
			break
		if j[k] == '-' and j[k + 1] == '-':
			x -= 1
			break
	continue
print(x)


import sys
if sys.version_info.major < 3:
	input = raw_input

def main():
	n = int(input())
	val = 0
	while n != 0:
		inc = int('%s1' % input().replace('X', '')[0])
		val += inc
		n -= 1
	return val
print(main())


x = int(input())
l = []
c = 0
for i in range(x):
	z = input()
	if z[1] == '+':
		c += 1
	else:
		c -= 1
print(c)


n = int(input())
count = 0
while n > 0:
	statement = list(filter(None, input().split('X')))
	if statement[0] == '++':
		count += 1
	else:
		count -= 1
	n -= 1
print(count)


x = int(input())
v = 0
n = 0
for i in range(x):
	y = input()
	for i in range(len(y)):
		if y[i] == '+':
			n = n + 1
		if y[i] == '-':
			n = n - 1
print(int(n / 2))


def resolve(entradas):
	valor = 0
	for entrada in entradas:
		if '+' in entrada:
			valor += 1
		else:
			valor -= 1
	return valor
quant = int(input())
entradas = []
for i in range(quant):
	entradas.append(input())
print(resolve(entradas))


x = int(input())
m = 0
for i in range(x):
	d = input()
	if d.count('+') == 2:
		m += 1
	else:
		m -= 1
print(m)


n = int(input())
res = 0
for _ in range(n):
	expr = input()
	first = expr[0]
	last = expr[-1]
	if first == '+' or last == '+':
		res += 1
	elif first == '-' or last == '-':
		res -= 1
print(res)


n = int(input())
res = 0
for i in range(n):
	str = input()
	if str == '++X' or str == 'X++':
		res += 1
	if str == '--X' or str == 'X--':
		res -= 1
print(res)


a = int(input())
x = 0
while a > 0:
	a -= 1
	vladurak = input()
	if vladurak == '++X' or vladurak == 'X++':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
m = 0
for i in range(n):
	s = input()
	if s[0] == 'X':
		if s[1] == '+':
			m = m + 1
		else:
			m = m - 1
	if s[2] == 'X':
		if s[1] == '+':
			m = m + 1
		else:
			m = m - 1
print(m)


n = int(input())
count = 0
x = 0
x_count = 0
while count < n:
	count += 1
	x = str(input())
	if x == '++X' or x == 'X++':
		x_count += 1
	elif x == '--X' or x == 'X--':
		x_count -= 1
print(x_count)


n = int(input())
x = 0
for i in range(n):
	lst = list(str(input()))
	if '+' in lst:
		x += 1
	elif '-' in lst:
		x -= 1
print(x)


test = int(input())
X = 0
for tc in range(test):
	strg = str(input())
	if '+' in strg:
		X += 1
	else:
		X -= 1
print(X)


t = int(input())
p = 0
for i in range(t):
	st = input()
	if st[-1] == '+':
		p += 1
	elif st[-1] == '-':
		p -= 1
	elif st[0] == '+':
		p += 1
	elif st[0] == '-':
		p -= 1
print(p)


n = int(input())
x = 0
add = '+'
minus = '-'
for i in range(n):
	a = str(input())
	if add in a:
		x = x + 1
	else:
		x = x - 1
print(x)


r = range(int(input().strip()))
X = 0
for _ in r:
	if input().find('++') >= 0:
		X += 1
	else:
		X -= 1
print(X)


x = 0
operationNumber = int(input())
for _ in range(operationNumber):
	operation = input()
	if operation.count('+') == 2:
		x += 1
	elif operation.count('-') == 2:
		x -= 1
print(x)


c = 0
for _ in range(int(input())):
	a = input()
	for i in a:
		if i == '+':
			c += 1
			break
		if i == '-':
			c -= 1
			break
print(c)


n = int(input())
x = 0
for i in range(n):
	statement = input()
	for i in statement:
		if i == '+':
			x += 0.5
		if i == '-':
			x -= 0.5
print(int(x))


t = int(input())
x = 0
while t > 0:
	op = input()
	if '++' in op:
		x += 1
	else:
		x -= 1
	t -= 1
	pass
print(x)


counter = int(input(''))
q = 0
if counter <= 1:
	n = str(input(''))
	if n == 'X++':
		q = q + 1
	elif n == '++X':
		q += 1
	elif n == '--X':
		q -= 1
	elif n == 'X--':
		q = q - 1
else:
	for X in range(counter):
		n = str(input(''))
		if X == counter - 1:
			if n == 'X++':
				q += 1
			elif n == '++X':
				q += 1
			elif n == '--X':
				q -= 1
			elif n == 'X--':
				q -= 1
		elif n == 'X++':
			q += 1
		elif n == '++X':
			q += 1
		elif n == '--X':
			q -= 1
		elif n == 'X--':
			q -= 1
print(q)


n = int(input())
l = []
for i in range(n):
	x = input()
	l.append(x)
p1 = l.count('X++')
p2 = l.count('++X')
s1 = l.count('--X')
s2 = l.count('X--')
print(p1 + p2 - s1 - s2)


a = int(input())
x = 0
for a in range(a):
	d = input()
	if '+' in d:
		x += 1
	else:
		x -= 1
print(x)


x = 0
operator = input()
for i in [0] * int(operator):
	n = input()
	if n == '++X' or n == 'X++':
		x = x + 1
	elif n == 'X--' or n == '--X':
		x = x - 1
print(x)


a = int(input())
s = ''
result = 0
for i in range(a):
	s = input()
	result += (s.rfind('+') > 0) * 1 - (s.rfind('-') > 0) * 1
print(result)


n = int(input())
nCount = 0
for i in range(n):
	sta = str(input())
	a = sta.count('+')
	b = sta.count('-')
	if a == 2:
		nCount += 1
	if b == 2:
		nCount = nCount - 1
print(int(nCount))


n = int(input())
x = 0
operations = []
for i in range(n):
	operation = input()
	operations.append(operation)
for j in operations:
	if j.count('+') > 0:
		x = x + 1
	else:
		x = x - 1
print(x)


def count(operacion):
	cuenta = 0
	for op in operacion:
		if '++' in op:
			cuenta += 1
		else:
			cuenta -= 1
	return cuenta
n = int(input())
numeros = []
for i in range(n):
	numeros.append(input())
print(count(numeros))


list = []

def op():
	cont = 0
	for i in list:
		if '+' in i:
			cont += 1
		elif '-' in i:
			cont -= 1
	print(cont)
n = int(input())
if n < 1 or n > 150:
	quit()
for i in range(0, n):
	list.append(input())
op()


n = int(input())
l = []
val = 0
for i in range(n):
	k = input()
	l = k.split()
	for j in k:
		if j == '+':
			val = val + 1
			break
		if j == '-':
			val = val - 1
			break
print(val)


TN = 1

def solution():
	n = int(input())
	ans = 0
	for i in range(n):
		l = input()
		if '+' in l:
			ans += 1
		else:
			ans -= 1
	print(ans)
while TN != 0:
	solution()
	TN -= 1


n = int(input())
import time
time.sleep(0.1)
x = 0
for i in range(n):
	op = input()
	if op[1] is '+':
		x += 1
	else:
		x -= 1
print(x)


num = int(input())
count = 0
for i in range(num):
	op = str(input())
	if '+' in op:
		count += 1
	if '-' in op:
		count -= 1
print(count)


n = int(input())
s = 0
for i in range(n):
	l = list(input())
	if l.count('+') == 2:
		s += 1
	else:
		s -= 1
print(s)


p = ['++X', 'X++']
m = ['--X', 'X--']
c = 0
for i in range(int(input())):
	a = input()
	if a in p:
		c += 1
	elif a in m:
		c -= 1
print(c)


t = int(input())
p = 0
for i in range(t):
	n = input()
	c = list(n)
	if c[0] == '+':
		p = p + 1
	elif c[0] == '-':
		p = p - 1
	elif c[-1] == '+':
		p = p + 1
	elif c[-1] == '-':
		p = p - 1
print(p)


x = []
for l in range(int(input())):
	x.append(input())
y = 0
for n in x:
	if n.count('+') == 2:
		y += 1
	else:
		y -= 1
print(y)


n = int(input())
ans = 0
for i in range(n):
	new = input()
	if new[0] == '+' or new[-1] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


a = int(input())
count = 0
for b in range(a):
	expression = input()
	if '+' in expression:
		count += 1
	else:
		count -= 1
print(count)


count = int(input())
val = 0
for i in range(count):
	op = ''.join([x for x in input() if x != 'X'])
	if op == '++':
		val += 1
	else:
		val -= 1
print(val)


import sys
inp = sys.stdin.read().split('\n')
x = 0
for i in inp[1:]:
	if '++' in i:
		x += 1
	elif '--' in i:
		x -= 1
print(x)


from collections import Counter
n = int(input())
a = 0
for i in range(n):
	t = input()
	if t == 'X++' or t == '++X':
		a = a + 1
	else:
		a = a - 1
print(a)


x = int(input())
a = []
sum = 0
for i in range(x):
	y = input()
	a.append(y)
for i in range(len(a)):
	if a[i] == 'X++' or a[i] == '++X':
		sum = sum + 1
	else:
		sum = sum - 1
print(sum)


sequence = input()
count = 0
for i in range(int(sequence)):
	operation = input()
	if '++' in operation:
		count += 1
	if '--' in operation:
		count -= 1
print(count)


n = int(input())
x = 0
while n > 0:
	string = input()
	sumtrigger = True
	subtrigger = True
	for c in string:
		if c == '+' and sumtrigger:
			x += string.count('+') // 2
			sumtrigger = False
		if c == '-' and subtrigger:
			x -= string.count('-') // 2
			subtrigger = False
	n -= 1
print(x)


n = int(input())
a = []
for x in range(n):
	a += input()
cplus = 0
cminus = 0
for x in range(len(a)):
	if a[x] == '+':
		cplus += 1
	elif a[x] == '-':
		cminus += 1
temp = cplus // 2 - cminus // 2
print(temp)


n = int(input())
n1 = 1
x = 0
while n1 <= n:
	s = input()
	if '+' in s:
		x += 1
	else:
		x -= 1
	n1 += 1
print(x)


print(sum((1 if i == '+' else -1 for i in (input()[1] for _ in range(int(input()))))))


n = int(input())
state = []
for i in range(n):
	m = input()
	state.append(m)
x = 0
for i in state:
	if '+' in i:
		x += 1
	elif '-' in i:
		x -= 1
print(x)


import sys
import math
inputs = sys.stdin.readline().split()
n = int(inputs[0])
x = 0
for i in range(n):
	inputs2 = str(input())
	if inputs2.startswith('+') or inputs2.endswith('+'):
		x = x + 1
	else:
		x = x - 1
print(x)


cont = 0
for i in range(int(input())):
	s = input()
	if s[1] == '+':
		cont += 1
	else:
		cont -= 1
print(cont)


n = int(input())
X = 0
statements = []
for value in range(1, n + 1):
	current_input = input().split()
	statements.append(current_input)
for statement in statements:
	current_statement = statement[0]
	plus_operation = 0
	minus_operation = 0
	for value in range(0, 3):
		current_operations = 0
		if current_statement[value] == '+':
			current_operations = current_operations + 1
		elif current_statement[value] == '-':
			current_operations = current_operations - 1
		if current_operations == 1:
			plus_operation = plus_operation + 1
		elif current_operations == -1:
			minus_operation = minus_operation - 1
	if plus_operation == 2:
		X = X + 1
	elif minus_operation == -2:
		X = X - 1
print(X)


a = int(input())
q = 0
w = 0
for s in range(a):
	z = str(input())
	q += z.count('+')
	w += z.count('-')
q /= 2
w /= 2
print(int(q - w))


k = int(input())
x = 0
for element in range(k):
	line = input()
	if line[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


lines = int(input())
operations = [input() for i in range(lines)]
answer = 0
for operation in operations:
	if '+' in operation:
		answer += 1
	else:
		answer -= 1
print(answer)


tasks = int(input())
taskNum = 0
x = 0
while taskNum < tasks:
	taskNum += 1
	if '++' in input():
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
count1 = 0
count2 = 0
for i in range(n):
	x = str(input())
	if x[1] == '+':
		count1 += 1
	else:
		count2 += 1
print(count1 - count2)


n = int(input())
x = 0
if n >= 1 and n <= 150:
	for i in range(n):
		s = input()
		if '+' in s:
			x = x + 1
		else:
			x = x - 1
print(x)


n = int(input())
x = 0
if 1 <= n <= 150:
	for i in range(1, n + 1):
		a = input()
		if a[1] == '+':
			x += 1
		elif a[1] == '-':
			x -= 1
print(x)


n = int(input())
x = 0
for i in range(n):
	s = input()
	l = len(s)
	for j in range(l):
		if s[j] == '+':
			x += 1
			break
		if s[j] == '-':
			x -= 1
			break
print(x)


x = int(input())
bilangan1 = 0
bilangan2 = 0
for i in range(x):
	y = input().lower()
	if y == 'x++' or y == '++x':
		bilangan1 += 1
	elif y == 'x--' or y == '--x':
		bilangan2 += 1
print(bilangan1 - bilangan2)


n = eval(input())
c = 0
while n > 0:
	l = input()
	if l[0] == '+' or l[1] == '+':
		c += 1
	else:
		c -= 1
	n -= 1
print(c)


while True:
	try:
		n = int(input())
		result = 0
		while n > 0:
			program = str(input())
			if '+' in program:
				result += 1
			elif '-' in program:
				result -= 1
			n -= 1
		print(result)
	except EOFError:
		break


n = int(input())
y = 1
x = 0
while y <= n:
	op = input()
	if op[1] == '+':
		x += 1
	elif op[1] == '-':
		x -= 1
	y = y + 1
print(x)


x = int(input())
r = 0
for i in range(0, x):
	t = input()
	if t[0] == '+' or t[2] == '+':
		r = r + 1
	if t[0] == '-' or t[2] == '-':
		r = r - 1
print(r)


import operator

def get_operator_fn(op):
	return {'+': operator.add, '-': operator.sub}[op]

def operate(x):
	for i in range(len(x)):
		if x[i].lower() != 'x':
			return get_operator_fn(x[i])

def solve(x):
	result = 0
	for i in range(len(x)):
		result = operate(x[i])(result, 1)
	return result
operations = int(input())
l = []
for i in range(operations):
	l.append(list(input()))
print(solve(l))


x = input()
result = 0
for i in range(int(x)):
	tmp = input()
	if '+' in tmp:
		result += 1
	else:
		result -= 1
print(result)


n = int(input())
x = 0
statements = []
for _ in range(n):
	statements.append(input())
for statement in statements:
	if statement == 'X++' or statement == '++X':
		x += 1
	if statement == 'X--' or statement == '--X':
		x -= 1
print(x)


k = []
for i in range(int(input())):
	su = input()
	k.append(su[1:2])
print(k.count('+') - k.count('-'))


val = 0
len = int(input())
for x in range(0, len):
	cmnd = input()
	if cmnd == 'X++':
		val = val + 1
	elif cmnd == '++X':
		val = val + 1
	elif cmnd == 'X--':
		val = val - 1
	elif cmnd == '--X':
		val = val - 1
print(val)


n = int(input())
sp = 0
sm = 0
while n != 0:
	m = input()
	if m.count('+') == 2:
		sp += 1
	else:
		sm += 1
	n = n - 1
print(sp - sm)


def solve():
	n = int(input())
	ol = []
	for i in range(n):
		ol.append(list(input()))
	x = 0
	for o in ol:
		if o[0] == '+' or o[1] == '+':
			x += 1
		else:
			x -= 1
	print(x)
solve()


def operation(n):
	x = 0
	for i in range(n):
		if input()[1] == '+':
			x += 1
		else:
			x -= 1
	return x
n = eval(input())
print(operation(n))


numberOfStatements = int(input())
statements = []
for i in range(numberOfStatements):
	statement = input()
	statements.append(statement[1])
x = 0
for operator in statements:
	if operator == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


n = int(input())
com = []
start = 0
for i in range(1, n + 1):
	string = input()
	com.append(string)
for i in com:
	if '+' in i:
		start += 1
	else:
		start -= 1
print(start)


n = int(input())
start = 1
total = 0
while start <= n:
	s = input()
	if '++' in s:
		total += 1
	elif '--' in s:
		total -= 1
	start += 1
print(total)


a = int(input())
res = 0
for i in range(0, a):
	str = input()
	if '+' in str:
		res = res + 1
	elif '-' in str:
		res = res - 1
print(res)


X = 0
n = int(input())
while n:
	s = input()
	if s.find('++') != -1:
		X += 1
	elif s.find('--') != -1:
		X -= 1
	n -= 1
print(X)


amountOfCommands = int(input())
number = 0
for x in range(amountOfCommands):
	commands = list(input())
	if '-' in commands:
		number -= 1
	else:
		number += 1
print(number)


def Bit(n):
	dem = 0
	c = []
	d = []
	for i in range(n):
		a = input()
		for j in range(len(a)):
			if a[j] == '+':
				c.append(a[j])
			if a[j] == '-':
				d.append(a[j])
	x = c.count('+')
	y = d.count('-')
	if x % 2 == 0:
		dem += x // 2
	if y % 2 == 0:
		dem -= y // 2
	return dem
n = int(input())
print(Bit(n))


n = int(input())
r = 0
ops = {'++X': 1, 'X++': 1, '--X': -1, 'X--': -1}
for i in range(n):
	r += ops[input()]
print(r)


x = 0
for i in range(int(input())):
	com = ''.join(input().split('X'))
	if com == '++':
		x += 1
	elif com == '--':
		x -= 1
print(x)


lenn = int(input())
vall = 0
for i in range(lenn):
	x = input()
	if x == '++X' or x == 'X++':
		vall += 1
	else:
		vall = vall - 1
print(vall)


no_of_statements = int(input())
x = 0
for statements in range(no_of_statements):
	statement = input()
	if '-' in statement:
		x -= 1
	else:
		x += 1
print(x)


n = int(input())
ans = 0
while n > 0:
	x = str(input())
	if '++' in x:
		ans += 1
	else:
		ans -= 1
	n -= 1
print(ans)


n = int(input())
cout = 0
for i in range(n):
	string = input()
	if '++' in string:
		cout += 1
	elif '--' in string:
		cout -= 1
print(cout)


x = 0
for testcase in range(int(input())):
	a = input()
	if a[0] == '+' or a[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


number = int(input())
result = 0
for i in range(number):
	string = input().split()
	if string[0] == '++X' or string[0] == 'X++':
		result += 1
	else:
		result -= 1
print(result)


n = int(input())
s1 = '++X'
s2 = 'X++'
s3 = '--X'
s4 = 'X--'
x = 0
for i in range(n):
	m = input()
	if m == s1 or m == s2:
		x = x + 1
	else:
		x = x - 1
print(x)


num = int(input())
rx = 0
for i in range(num):
	com = str(input())
	if com[0] == '+' or com[1] == '+':
		rx += 1
	else:
		rx += -1
print(rx)


n = int(input())
x = 0
for i in range(n):
	lis = []
	inp = input()
	for j in inp:
		lis.append(j)
	for k in lis:
		if k == '+':
			x += 1 / 2
		if k == '-':
			x -= 1 / 2
print(int(x))


n = int(input())
i = 0
X = []
while i < n:
	X.append(input())
	i = i + 1
a = X.count('++X') + X.count('X++') + X.count('+X+')
b = X.count('X--') + X.count('--X') + X.count('-X-')
print(a - b)


x = int(input())
t = 0
for i in range(x):
	a = input()
	k = 0
	m = 0
	for r in range(len(a)):
		if a[r] == '+':
			k = k + 1
		if a[r] == '-':
			m = m + 1
	if k == 2:
		t = t + 1
	if m == 2:
		t = t - 1
print(int(t))


n = int(input())
ans = 0
for i in range(n):
	temp = input()
	if temp == 'X++' or temp == '++X':
		ans += 1
	if temp == 'X--' or temp == '--X':
		ans -= 1
print(ans)


nlines = int(input())
lines = []
for i in range(nlines):
	lines.append(input())
x = 0
for i in range(len(lines)):
	if '-' in lines[i]:
		x -= 1
	else:
		x += 1
print(x)


n = int(input())
k = 0
for i in range(n):
	vr = []
	vr = input()
	if vr[0] == '+' and vr[1] == '+' or (vr[2] == '+' and vr[1] == '+'):
		k = k + 1
	else:
		k = k - 1
print(k)


n = int(input())
res = 0
for i in range(0, n):
	if str(input()).find('+') != -1:
		res += 1
	else:
		res -= 1
print(res)


summ = 0
n = int(input())
List = []
for i in range(n):
	List.append(input())
for x in List:
	if x == 'X++' or x == '++X':
		summ += 1
	elif x == 'X--' or x == '--X':
		summ -= 1
print(summ)


n = int(input())
pro = 0
for i in range(n):
	var = input()
	if var[1] == '+':
		pro += 1
	else:
		pro -= 1
print(pro)


pocet = int(input())
cislo = 0
for i in range(pocet):
	operacia = input()
	if operacia[0] == '-' or operacia[1] == '-':
		cislo -= 1
	else:
		cislo += 1
print(cislo)


b = int(input())
a = []
c = 0
for i in range(0, int(b)):
	a.append(input())
for i in a:
	if i == 'X++':
		c = c + 1
	if i == '++X':
		c = c + 1
	if i == 'X--':
		c = c - 1
	if i == '--X':
		c = c - 1
print(c)


print(sum((1 if '++' in input() else -1 for j in range(int(input())))))


numOfOperations = int(input())
listOfOperations = []
result = 0
for i in range(numOfOperations):
	x = input()
	listOfOperations.append(x)
for i in range(0, numOfOperations):
	if listOfOperations[i][0] == 'X':
		if listOfOperations[i][1] == '+':
			result += 1
		else:
			result -= 1
	elif listOfOperations[i][0] == '+':
		result += 1
	else:
		result -= 1
print(result)


x = 0
for b in range(int(input())):
	c = str.lower(input())
	if c in ('++x', 'x++'):
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
p = []
plus = 0
minus = 0
for i in range(0, n):
	p.append(input())
for item in p:
	if '+' in item:
		plus += 1
	if '-' in item:
		minus += 1
total = plus - minus
print(total)


def calc(n, s):
	x = 0
	for line in s:
		memo = {}
		for char in line:
			memo[char] = memo.get(char, 0) + 1
		if len(memo) == 2 and 'X' in memo:
			if '-' in memo and memo['-'] == 2:
				x -= 1
			elif '+' in memo and memo['+'] == 2:
				x += 1
	return x
n = int(input())
s = []
for _ in range(n):
	s.append(input())
print(calc(n, s))


lines = int(input())
X = 0
for i in range(lines):
	line = input().replace('X', '')
	if line == '++':
		X += 1
	else:
		X -= 1
print(X)


a = int(input())
alg = []
for i in range(0, a):
	alg.append(input())
start = 0
for i in alg:
	if '+' in i:
		start += 1
	else:
		start -= 1
print(start)


lines = int(input())
x = 0
for i in range(lines):
	strs = input()
	if '+' in strs:
		x = x + 1
	else:
		x = x - 1
print(x)


n1 = int(input())
x = 0
while n1 > 0:
	i = input()
	if i == '++X' or i == 'X++':
		x = x + 1
	else:
		x = x - 1
	n1 = n1 - 1
print(x)


testcase = int(input())
x = 0
for test in range(testcase):
	com = input()
	if com == '++X' or com == 'X++':
		x += 1
	else:
		x -= 1
print(x)


x = 0
t = int(input())
while t:
	s = input()
	if s.find('+') >= 0:
		x = x + 1
	else:
		x = x - 1
	t = t - 1
print(x)


n = int(input())
x = 0
for i in range(n):
	a = input()
	if a[0] == '+' or a[len(a) - 1] == '+':
		x += 1
		continue
	if a[0] == '-' or a[len(a) - 1] == '-':
		x -= 1
		continue
print(x)


number = int(input())
all_commands = []
x = 0
for i in range(number):
	command = str(input())
	if len(command) != 3:
		print('Maybe invalid command')
		break
	else:
		all_commands.append(command)
for i in all_commands:
	if '++' in i:
		x += 1
	elif '--' in i:
		x -= 1
	else:
		print('Other than ++ or --')
print(x)


from sys import stdin

def final_x_value(lines):
	val = 0
	for line in lines:
		if '+' in line:
			val += 1
		else:
			val -= 1
	return val
n = int(stdin.readline())
lines = []
for _ in range(n):
	lines.append(stdin.readline())
print(final_x_value(lines))


n = int(input())
count = 0
for prob in range(1, n + 1):
	bit = input()
	if bit == '++X' or bit == 'X++':
		count = count + 1
	else:
		count = count - 1
print(count)


n = int(input())
x = 0
for i in range(n):
	y = input()
	if y.startswith('++') or y.endswith('++'):
		x += 1
	if y.startswith('--') or y.endswith('--'):
		x -= 1
print(x)


N = int(input())
x = 0
for i in range(N):
	string = input()
	if string == '++X' or string == 'X++':
		x += 1
	else:
		x -= 1
print(x)


test = int(input())
count = 0
for i in range(0, test):
	temp = input()
	if temp[1] == '-':
		count = count - 1
	elif temp[1] == '+':
		count = count + 1
print(count)


total_statements = int(input().strip())
statements = []
while len(statements) < total_statements:
	statements.extend(input().strip().split())
print(statements.count('X++') + statements.count('++X') - statements.count('--X') - statements.count('X--'))


lines = int(input())
count = 0
for line in range(lines):
	operation = input()
	if '++' in operation:
		count += 1
	if '--' in operation:
		count -= 1
print(count)


number_of_statements = int(input())
x = 0
statement = []
while number_of_statements > 0:
	statement.append(input())
	number_of_statements -= 1
for i in statement:
	if i == 'X++' or i == '++X':
		x += 1
	elif i == 'X--' or i == '--X':
		x -= 1
print(x)


number = 0

def doOper(command, number):
	if command[-1] == '\n':
		command = command[0:-1]
	if command == 'X--' or command == '--X' or command == '-X-':
		number -= 1
	elif command == 'X++' or command == '++X' or command == '+X+':
		number += 1
	else:
		return False
	return number
strings = int(input())
for i in range(strings):
	command = input()
	number = doOper(command, number)
print(number)


n = int(input())
value = 0
for i in range(n):
	operation = input()
	if operation[0] == '+' or operation[-1] == '+':
		value += 1
	else:
		value -= 1
print(value)


N = int(input())
n = 1
sum = 0
while n <= N:
	n = n + 1
	line = str(input())
	if '+' in line:
		sum = sum + 1
	if '-' in line:
		sum = sum - 1
print(sum)


no = int(input())
x = 0
for i in range(no):
	string = input()
	if string[0] == '+' or string[-1] == '+':
		x += 1
	else:
		x -= 1
print(x)


ans = 0
a = int(input())
for i in range(0, a):
	b = input()
	if b[0] == '+' and b[1] == '+' or (b[2] == '+' and b[1] == '+'):
		ans += 1
	if b[0] == '-' and b[1] == '-' or (b[2] == '-' and b[1] == '-'):
		ans -= 1
print(ans)


print(sum((('+' in input()) * 2 - 1 for i in range(int(input())))))


n = int(input())
a = ''
for i in range(n):
	a += input()
X = a.count('+')
Y = a.count('-')
ans = int(X / 2 - Y / 2)
print(ans)


import sys

def solver(a):
	count = 0
	for x in a:
		if x.find('++') >= 0:
			count = count + 1
		else:
			count = count - 1
	return count

def main():
	lines = sys.stdin.readlines()
	pop = lines[1:]
	print(solver(pop))
main()


tc = int(input())
r = 0
while tc > 0:
	st = input()
	if st == 'X++' or st == '++X':
		r += 1
	else:
		r -= 1
	tc -= 1
print(r)


w = int(input())
x = 0
while w:
	w -= 1
	op = input()
	if op[1] == '+':
		x += 1
	elif op[1] == '-':
		x -= 1
print(x)


n = int(input())
x = 0
for i in range(n):
	p = input()
	if p.count('++') == 1:
		x += 1
	if p.count('--') == 1:
		x -= 1
print(x)


x = int(input())
ls = []
count = 0
for i in range(x):
	ls.append(input())
for m in ls:
	if m == 'X++' or m == '++X':
		count += 1
	else:
		count -= 1
print(count)


class Scanner:

	def __init__(self):
		self.current_tokens = []

	def remaining_tokens(self):
		return len(self.current_tokens)

	def nextline(self):
		assert self.remaining_tokens() == 0, 'Reading next line with remaining tokens'
		return input()

	def nexttokens(self):
		return self.nextline().split()

	def nexttoken(self):
		if len(self.current_tokens) == 0:
			self.current_tokens = self.nexttokens()
		assert self.remaining_tokens() > 0, 'Not enough tokens to parse.'
		return self.current_tokens.pop(0)

	def nextints(self, n=-1):
		if n == -1:
			return list(map(int, self.nexttokens()))
		else:
			return (self.nextint() for i in range(n))

	def nextint(self):
		return int(self.nexttoken())
stdin = Scanner()
nextint = stdin.nextint
nextints = stdin.nextints
nextline = stdin.nextline
n = nextint()
x = 0
for i in range(n):
	s = nextline()
	if '+' in s:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
a = []
x = 0
for i in range(n):
	a.append(input().split('X'))
for i in range(n):
	for j in range(len(a[i])):
		if a[i][j] == '++':
			x += 1
		elif a[i][j] == '--':
			x -= 1
print(x)


n = int(input())
intital = 0
total_operations = []
while n > intital:
	operation = input()
	total_operations.append(operation)
	intital += 1
x = 0
for i in total_operations:
	if i == '++X' or i == 'X++':
		x += 1
	else:
		x -= 1
print(x)


a = int(input())
l = []
for i in range(a):
	l.append(input())
count = 0
for i in l:
	if '+' in i:
		count += 1
	else:
		count -= 1
print(count)


x = 0
for i in range(int(input())):
	s = input()
	if s[0] and s[1] == '+':
		x = x + 1
	elif s[1] and s[-1] == '+':
		x = x + 1
	elif s[0] and s[1] == '-':
		x = x - 1
	elif s[1] and s[-1] == '-':
		x = x - 1
	else:
		continue
print(x)


x = int(input())
sum1 = 0
for i in range(0, x):
	y = input()
	if '+' in y:
		sum1 += 1
	elif '-' in y:
		sum1 -= 1
print(sum1)


n = int(input())
print(sum((1 if input()[1] == '+' else -1 for _ in range(n))))


n = int(input())
res = 0
for i in range(n):
	b = input()
	a = [i for i in b]
	if a[0] == '+' or a[-1] == '+':
		res += 1
	if a[0] == '-' or a[-1] == '-':
		res -= 1
print(res)


n = int(input())
k = 0
while n > 0:
	code = input()
	if code == 'X--' or code == '--X':
		k -= 1
	if code == 'X++' or code == '++X':
		k += 1
	n -= 1
print(k)


n = int(input())
x = 0
while n > 0:
	stmt = input()
	if stmt[1] == '-':
		x -= 1
	else:
		x += 1
	n -= 1
print(x)


x = 0
n = int(input(''))
i = 0
while i < n:
	i += 1
	c = input('')
	if c.lower() == '++x' or c.lower() == 'x++':
		x += 1
	elif c.lower() == '--x' or c.lower() == 'x--':
		x -= 1
print(x)


n = int(input())
s = 0
for i in range(n):
	word = tuple(input())
	if word[1] == '+':
		s += 1
	else:
		s -= 1
print(s)


n = int(input())
curr = 0
for _ in range(n):
	line = input().rstrip()
	if '++' in line:
		curr += 1
	else:
		curr -= 1
print(curr)


t = int(input())
x = 0
while t:
	n = input()
	if n[1] == '+':
		x += 1
	else:
		x -= 1
	t -= 1
print(x)


num_cases = int(input())
count = 0
for i in range(num_cases):
	op = input()
	if op == 'X++' or op == '++X':
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
count = 0
for i in range(n):
	inp = str(input())
	if '-' in inp:
		count -= 1
	elif '+' in inp:
		count += 1
print(count)


t = int(input())
i = 0
while t != 0:
	exp = input()
	if exp == 'X++' or exp == '++X':
		i += 1
	else:
		i -= 1
	t -= 1
print(i)


n = int(input())
c = 0
for _ in range(n):
	op = str(input())
	if op.count('+') != 0:
		c += 1
	elif op.count('-') != 0:
		c -= 1
print(c)


ans = 0
for _ in range(0, int(input())):
	s = input()
	if s.count('+') != 0:
		ans += 1
	else:
		ans -= 1
print(ans)


numberOfStatements = int(input())
x = 0
for i in range(numberOfStatements):
	statement = input()
	if statement == '++X' or statement == 'X++':
		x += 1
	else:
		x -= 1
print(x)


def bit():
	n = int(input())
	X = 0
	for i in range(n):
		slowo = input()
		if slowo[1] == '+':
			X += 1
		else:
			X -= 1
	return X
print(bit())


q = int(input())
c = 0
for _ in q * ' ':
	c += input()[1] == '+' and 1 or -1
print(c)


count = 0
for _ in [0] * int(input()):
	if input().count('++') == 1:
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
x = 0
for _ in range(n):
	operation = input()
	(first, *_, last) = operation
	if first == '+' or last == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
value = 0
for i in range(n):
	s = str(input())
	if s == '++X' or s == 'X++':
		value += 1
	elif s == '--X' or s == 'X--':
		value -= 1
print(value)


import sys
n = int(input())
ans = 0
for i in range(n):
	s = sys.stdin.readline().strip()
	if s[1] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


def compute(a):
	y = 0
	for i in a:
		if i == 'X++' or i == '++X':
			y += 1
		else:
			y -= 1
	print(y)
z = int(input())
a = []
for i in range(z):
	b = input()
	a.append(b)
compute(a)


a = int(input())
i = 0
ans = 0
while i < a:
	x = input()
	if x[1] == '+':
		ans += 1
	else:
		ans -= 1
	i += 1
print(ans)


testcases = int(input())
counter = 0
for i in range(testcases):
	string = input()
	x = string[0]
	y = string[1]
	z = string[2]
	if x == 'X' and y == '+':
		counter += 1
	elif x == 'X' and y == '-':
		counter -= 1
	elif z == 'X' and y == '+':
		counter += 1
	elif z == 'X' and y == '-':
		counter -= 1
print(counter)


n = int(input())
x = 0
for ix in range(0, n):
	cmd = input()
	if '++' in cmd:
		x += 1
	elif '--' in cmd:
		x -= 1
print(x)


def fun():
	n = int(input().strip())
	x = 0
	pone = 'X++'
	ptwo = '++X'
	mone = 'X--'
	mtwo = '--X'
	for i in range(n):
		o = input().strip()
		if o.startswith(pone) or o.startswith(ptwo):
			x += 1
		elif o.startswith(mone) or o.startswith(mtwo):
			x -= 1
	print(x)
fun()


import math

def read_ints():
	return map(int, input().split())
p = int(input())
x = 0
for i in range(p):
	s = input()
	if s == '++X' or s == 'X++':
		x += 1
	else:
		x -= 1
print(x)


num_int = input()
num_int = int(num_int)
all_values = []
sum = 0
for x in range(num_int):
	value = input()
	all_values.append(value)
	if value.find('X') == 2:
		if value[0:2] == '++':
			sum += 1
		else:
			sum -= 1
	elif value[1:3] == '++':
		sum += 1
	else:
		sum -= 1
print(sum)


count = 0
for x in range(int(input())):
	if str(input())[1] == '+':
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
y = 0
for x in range(n):
	statement = input()
	if statement == 'X++' or statement == '++X':
		y += 1
	else:
		y -= 1
print(y)


a = int(input())
y = 0
for x in range(a):
	b = list(input())
	if '+' in b:
		y += 1
	if '-' in b:
		y -= 1
print(y)


inp = int(input())
x = 0
while inp > 0:
	i = input()
	if '+' in i:
		x = x + 1
	elif '-' in i:
		x = x - 1
	inp = inp - 1
print(x)


n = int(input())
e = 0
for i in range(n):
	s = input()
	w = s.replace('X', '')
	if w[0] == '+':
		e = e + 1
	else:
		e = e - 1
print(e)


X = 0
t = int(input())
for i in range(t):
	o = input()
	if o == 'X++' or o == '++X':
		X = X + 1
	elif o == 'X--' or o == '--X':
		X = X - 1
print(X)


x = 0
for i in range(int(input().strip())):
	val = input().strip()
	if val == '++X' or val == 'X++':
		x = x + 1
	else:
		x = x - 1
print(x)


x = int(input())
y = [input() for i in range(x)]
z = sum([1 if '+' in i else -1 for i in y])
print(z)


test_cases = int(input())
a = 0
for i in range(test_cases):
	bit = input()
	if bit[0] == '+' or bit[-1] == '+':
		a = a + 1
	else:
		a = a - 1
print(a)


x = 0
for _ in range(int(input())):
	l = input().replace('X', '')
	if l == '--':
		x -= 1
	else:
		x += 1
print(x)


cnt = 0
a = int(input())
for i in range(a):
	a = input()
	if a == 'X++' or a == '++X':
		cnt += 1
	else:
		cnt -= 1
print(cnt)


n = int(input())
c = 0
for _ in range(1, n + 1):
	t = str(input())
	if '++' in t:
		c = c + 1
		continue
	if '--' in t:
		c = c - 1
		continue
print(c)


n = int(input())
sol = 0
for i in range(n):
	s = input()
	if s[0] == '+' and s[1] == '+':
		sol += 1
	elif s[1] == '+' and s[2] == '+':
		sol += 1
	elif s[0] == '-' and s[1] == '-':
		sol -= 1
	elif s[1] == '-' and s[2] == '-':
		sol -= 1
print(sol)


x = int(input())
i = 0
l = 0
a = []
while i < x:
	a.append(input())
	i += 1
for k in a:
	if k == 'X++' or k == '++X':
		l += 1
	else:
		l -= 1
print(l)


statements = []
x = 0
for i in range(int(input(''))):
	statements.append(input(''))
for stmt in statements:
	if '-' in stmt:
		x -= 1
	if '+' in stmt:
		x += 1
print(x)


n = int(input())
all = []
for i in range(n):
	temp = input()
	for j in range(len(temp)):
		if temp[j] == 'X':
			all.append(0)
		elif temp[j] == '+':
			all.append(1)
		else:
			all.append(-1)
print(int(sum(all) / 2))


lp = ['++X', 'X++']
res = 0
i = 0
n = int(input())
while i < n:
	i += 1
	x = input()
	if x in lp:
		res += 1
	else:
		res -= 1
print(res)


x = 0
n = int(input())
for i in range(n):
	r = str(input())
	if r.count('++'):
		x += 1
	elif r.count('--'):
		x -= 1
print(x)


regels = list()
aantalRegels = int(input())
x = 0
for teller in range(aantalRegels):
	if '++' in input():
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
X = []
x = 0
assert n >= 1 and n <= 150
for i in range(n):
	X.append(input())
	if X[i] == 'X++' or X[i] == '++X':
		x += 1
	elif X[i] == 'X--' or X[i] == '--X':
		x -= 1
print(x)


def bitplusplus(statements):
	ans = 0
	for statement in statements:
		if '+' in statement:
			ans += 1
		else:
			ans -= 1
	return ans
statements = []
for _ in range(int(input())):
	statements.append(input())
print(bitplusplus(statements))


n = int(input())
ans = 0
for i in range(n):
	k = input().strip('X')
	if k == '++':
		ans += 1
	else:
		ans -= 1
print(ans)


nl = int(input())
res = 0
for i in range(0, nl):
	code = input()
	if '++' in code:
		res += 1
	elif '--' in code:
		res -= 1
print(res)


def check(x):
	if x.count('++') > 0:
		return 1
	return -1
aSum = 0
n = int(input())
for i in range(0, n):
	aSum += check(input())
print(aSum)


n = int(input())
x = 0
for i in range(n):
	statement = input()
	increase = statement.count('++')
	decrease = statement.count('--')
	x += increase - decrease
print(x)


n = int(input())
arr = [0] * n
for i in range(0, n):
	arr[i] = input()
x = 0
for i in range(0, len(arr)):
	if arr[i] == '++X' or arr[i] == 'X++':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
while n > 0:
	operation = str(input())
	if operation == '++X' or operation == 'X++':
		x += 1
	else:
		x -= 1
	n -= 1
print(x)


num = int(input())
y = 0
for n in range(num):
	x = input()
	if '++' in x:
		y += 1
	elif '--' in x:
		y -= 1
	else:
		pass
print(y)


def main():
	n = int(input())
	x = 0
	for i in range(n):
		str = list(input())
		if str[1] == '+':
			x += 1
		else:
			x -= 1
	print(x)
main()


import sys
n = int(input())
result = 0
for i in range(n):
	cmd = input()
	if cmd == '++X' or cmd == 'X++':
		result = result + 1
	elif cmd == '--X' or cmd == 'X--':
		result = result - 1
print(result)


n = int(input())
res = 0
for _ in range(n):
	if input().find('++') == -1:
		res -= 1
	else:
		res += 1
print(res)


number_of_bits = int(input())
value = 0
for i in range(number_of_bits):
	bit = input()
	if bit[1] == '+':
		value += 1
	else:
		value -= 1
print(value)


inp = input()
n = int(inp)
op = []
for i in range(n):
	z = input()
	z = list(z)
	z.sort()
	op.append(z)
x = 0
for y in op:
	if y[0] == '+':
		x += 1
	else:
		x -= 1
print(x)


test_cases = int(input())
x_base = 0
for _unk in range(test_cases):
	current_operation = input()
	if '++' in current_operation:
		x_base += 1
	elif '--' in current_operation:
		x_base -= 1
print(x_base)


n = int(input().strip())
c = 0
for _ in range(n):
	s = input().strip()
	if '++' in s:
		c += 1
	elif '--' in s:
		c -= 1
print(c)


def main():
	n = int(input())
	sequence = list()
	result = 0
	for x in range(n):
		s = input()
		sequence.append(s)
	for op in sequence:
		if '+' in op:
			result += 1
		else:
			result -= 1
	print(result)
main()


try:
	val = 0
	for i in range(int(input())):
		st = input()
		if '++' in st:
			val += 1
		if '--' in st:
			val -= 1
	print(val)
	pass
except Exception:
	pass


n = int(input())
x = 0
for i in range(n):
	v = str(input())
	if '++' in v:
		x = x + 1
	else:
		x = x - 1
print(x)


import sys
import math
from collections import Counter
from collections import OrderedDict
from functools import reduce
sys.setrecursionlimit(10 ** 6)

def inputt():
	return sys.stdin.readline().strip()

def printt(n):
	sys.stdout.write(str(n) + '\n')

def listt():
	return [int(i) for i in inputt().split()]

def gcd(a, b):
	return math.gcd(a, b)

def lcm(a, b):
	return a * b // gcd(a, b)

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))
n = int(inputt())
x = 0
for _ in range(n):
	s = inputt()
	if s[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for k in range(n):
	s = input()
	s1 = '++'
	if s1 in s:
		x = x + 1
	else:
		x = x - 1
print(x)


def execute():
	n = int(input())
	plus = 0
	minus = 0
	for i in range(n):
		x = input()
		if x == 'X++' or x == '++X':
			plus += 1
		else:
			minus += 1
	return plus - minus
print(execute())


def main():
	n = int(input())
	x = 0
	for i in range(n):
		operator = input()
		for j in operator:
			if j == '+':
				x += 1
				break
			if j == '-':
				x -= 1
				break
	print(x)
main()


a = int(input())
x = 0
for i in range(a):
	str = input()
	if str == 'X++' or str == '++X':
		x += 1
	elif str == 'X--' or str == '--X':
		x -= 1
print(x)


n = int(input())
s = 0
for _ in range(n):
	x = input()
	if x.count('-') == 2:
		s -= 1
	else:
		s += 1
print(s)


n = int(input())
sum = 0
for i in range(n):
	m = input()
	if '+' in m:
		sum += 1
	if '-' in m:
		sum -= 1
print(sum)


n = int(input())
X = 0
i = 0
while i < n:
	cmd = input()
	if cmd == 'X++' or cmd == '++X':
		X += 1
	else:
		X -= 1
	i += 1
print(X)


ui_num = int(input())
total = 0
for x in range(ui_num):
	ui = input()
	if ui[:2] == '++' or ui[1:] == '++':
		total += 1
	elif ui[:2] == '--' or ui[1:] == '--':
		total -= 1
print(total)


n = eval(input())
x = 0
for i in range(n):
	ch = input()
	if ch in ['++X', 'X++']:
		x += 1
	elif ch in ['--X', 'X--']:
		x -= 1
print(x)


n = int(input())
i = 0
q = []
while i < n:
	q.append(input())
	i += 1
x = 0
for s in q:
	if s.find('--') != -1:
		x -= 1
	else:
		x += 1
print(x)


x = 0
j = []
for i in range(int(input())):
	j.append(input())
for i in j:
	if i == '++X' or i == 'X++':
		x += 1
	else:
		x -= 1
print(x)


def main():
	cnt = int(input())
	lines = []
	x = 0
	for i in range(cnt):
		lines.append(input())
	for i in range(cnt):
		if '++' in lines[i]:
			x += 1
		else:
			x -= 1
	print(x)
main()


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
n = inp()
L = []
for i in range(n):
	d = insr()
	L.append(d)
S = 0
for j in L:
	if j[1] == '+':
		S += 1
	else:
		S += -1
print(S)


import sys
x = 0
for line in sys.stdin:
	if line.find('++') >= 0:
		x = x + 1
	elif line.find('--') >= 0:
		x = x - 1
print(x)


n = int(input())
x = 0

def op(s):
	return False if '-' in s else '+' in s
for i in range(n):
	s = input()
	if op(s):
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
c = 0
for _ in range(n):
	inp = input()
	if '+' in inp:
		c = c + 1
	elif '-' in inp:
		c = c - 1
print(c)


y = 0
n = int(input())
for i in range(n):
	w = input()
	if w == '++X' or w == 'X++':
		y = y + 1
	else:
		y = y - 1
print(y)


def operation(string, current_value):
	if string == '+':
		current_value = current_value + 1
	else:
		current_value = current_value - 1
	return current_value
n = int(input())
if n >= 1 and n <= 150:
	op = list()
	res = 0
	for i in range(n):
		s = str(input())
		op.append(s)
		res = operation(op[i][1], res)
	print(res)
else:
	quit()


n = int(input())
value = 0
while n > 0:
	inputs = list(map(str, input().split()))
	statement = list(inputs[0])
	if '-' in statement:
		value = value - 1
	elif '+' in statement:
		value = value + 1
	n = n - 1
print(value)


n = int(input())
mat = []
for m in range(n):
	op = input()
	mat.append(op)
x = 0
for a in mat:
	if a == '++X':
		x = x + 1
	elif a == '--X':
		x = x - 1
	elif a == 'X++':
		x = x + 1
	elif a == 'X--':
		x = x - 1
print(x)


t = int(input())
x = 0
for i in range(t):
	(p, q, r) = list(input().strip())
	if q == '+':
		x += 1
	else:
		x -= 1
print(x)


t = int(input())
X = 0
for _ in range(t):
	statement = input()
	if '++' in statement:
		X += 1
	elif '--' in statement:
		X -= 1
print(X)


x = int(input())
y = []
for i in range(0, x):
	z = input()
	y.append(z)
m = 0
for elem in range(0, len(y)):
	if y[elem] == '++X' or y[elem] == 'X++':
		m += 1
	else:
		m -= 1
print(m)


test = int(input())
arr = []
x = 0
for i in range(test):
	arr.append(input())
for i in arr:
	if i == 'X++' or i == '++X':
		x += 1
	else:
		x -= 1
print(x)


import sys
import re
lines = sys.stdin.readlines()

def op2(val, arg):
	x = re.findall('^X[\\+]{2}|^X[\\-]{2}|[\\+]{2}X$|[\\-]{2}X$', arg)
	if not x:
		return 0
	if x[0] == 'X++' or x[0] == '++X':
		return 1
	elif x[0] == 'X--' or x[0] == '--X':
		return -1
val = 0
for line in lines:
	val += op2(val, line)
print(val)


qi = lambda : int(input())
qs = lambda : input().split()
x = 0
for _ in range(qi()):
	if '+' in input():
		x += 1
	else:
		x -= 1
print(x)


cases = int(input())
ans = 0
while cases > 0:
	ipstr = input()
	if '+' in ipstr:
		ans = ans + 1
	elif '-' in ipstr:
		ans = ans - 1
	cases = cases - 1
print(ans)


Bitland_x = 0
Bitland_num = int(input())
i = 0
j = 0
Bit_string = []
while i < Bitland_num:
	Bit_string.append(input())
	i += 1
i = 0
while i < Bitland_num:
	if Bit_string[i][0] == '+' or Bit_string[i][1] == '+' or Bit_string[i][2] == '+':
		Bitland_x += 1
	if Bit_string[i][0] == '-' or Bit_string[i][1] == '-' or Bit_string[i][2] == '-':
		Bitland_x -= 1
	i += 1
print(Bitland_x)


x = int(input())
m = []
for n in range(x):
	s = [n for n in input()]
	m += s
k = m.count('+')
z = m.count('-')
print((k - z) // 2)


t = int(input())
x = 0
while t > 0:
	inp = str(input())
	if inp == '++X' or inp == 'X++':
		x += 1
	elif inp == '--X' or inp == 'X--':
		x -= 1
	t -= 1
print(x)


n = int(input())
x = 0
d = 0
for i in range(n):
	a = input()
	d = a.count('+')
	if d == 2:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
answer = 0
for i in range(n):
	tempt = list(input())
	if tempt.count('+') == 2:
		answer = answer + 1
	if tempt.count('-') == 2:
		answer = answer - 1
print(answer)


n = int(input())
x = 0
for y in range(0, n):
	s = input()
	if s == '++x' or s == 'x++' or s == '++X' or (s == 'X++'):
		x = x + 1
	elif s == '--x' or x == 'x--' or s == '--X' or (s == 'X--'):
		x = x - 1
print(x)


n = int(input())
a = []
counter = 0
inc = ['X++', '++X']
dec = ['X--', '--X']
for i in range(n):
	comm = str(input())
	a.append(comm)
for values in a:
	if values in inc:
		counter += 1
	elif values in dec:
		counter -= 1
print(counter)


l = []
c = 0
for _ in range(int(input())):
	s = input()
	l.append(s)
for i in l:
	if i == 'X++' or i == '++X':
		c += 1
	else:
		c -= 1
print(c)


qOperaciones = int(input())
x = 0
for i in range(qOperaciones):
	operacion = input()
	if operacion == 'X++' or operacion == '++X':
		x += 1
	elif operacion == 'X--' or operacion == '--X':
		x -= 1
print(x)


i = 0
n = 0
a = int(input())
while i < a:
	l = input()
	if l.count('+') == 2:
		n = n + 1
	elif l.count('-') == 2:
		n = n - 1
	i = i + 1
print(n)


n = int(input())
x = 0
l1 = list()
for i in range(n):
	i = str(input())
	if i == 'X++' or i == '++X':
		x += 1
	elif i == 'X--' or i == '--X':
		x -= 1
print(x)


n = int(input())
output = 0
for k in range(n):
	i = input()
	if i == '++X' or i == 'X++' or i == '++x' or (i == 'x++'):
		output += 1
	if i == '--X' or i == 'X--' or i == '--x' or (i == 'x--'):
		output -= 1
print(output)


n = int(input())
aList = []
plus_counter = 0
minus_counter = 0
for i in range(n):
	aList.append(input())
	if '+' in aList[i]:
		plus_counter += 1
	else:
		minus_counter += 1
print(plus_counter - minus_counter)


n = int(input())
count = 0
random = 0
for i in range(n):
	a = input().rstrip()
	if a[0] == '+' or a[1] == '+' or a[2] == '+':
		count += 1
	if a[1] == '-' or a[0] == '-' or a[2] == '-':
		random += 1
print(count - random)


n = int(input())
x = 0
for _ in range(n):
	op = input()
	if op == 'X++' or op == '++X':
		x += 1
	elif op == 'X--' or op == '--X':
		x -= 1
	else:
		continue
print(x)


def program():
	if '++' in string:
		return 1
	else:
		return -1
case = int(input())
add = 0
for i in range(case):
	string = input()
	add += program()
print(add)


def main():
	X = 0
	for operation in operations:
		if '+' in operation:
			X += 1
		elif '-' in operation:
			X -= 1
	return X
n = input()
X = 0
operations = []
for i in range(int(n)):
	operation = input()
	operations.append(operation)
print(main())


n = int(input())
r = 0
for i in range(n):
	s = input().rstrip('X').lstrip('X')
	if s == '++':
		r = r + 1
	else:
		r = r - 1
print(r)


import math
n = int(input())
ans = 0
c = []
while n:
	c.append(str(input()))
	n -= 1
for x in range(0, len(c)):
	if c[x][1] == '+':
		ans += 1
	elif c[x][1] == '-':
		ans -= 1
print(ans)


n = int(input())
store = []
for i in range(n):
	store.append(str(input()))
result = store.count('X++') + store.count('++X') - store.count('--X') - store.count('X--')
print(result)


val = 0
t = int(input())
for i in range(t):
	arr = input()
	arr = list(arr)
	for j in range(len(arr)):
		if arr[j] == '+':
			val += 0.5
		elif arr[j] == '-':
			val -= 0.5
print(int(val))


n = int(input())
x = 0
for i in range(n):
	inn = input()
	for word in inn:
		if word == '+':
			x += 1
			break
		elif word == '-':
			x -= 1
			break
print(x)


a = int(input())
k = 0
for i in range(a):
	s = input()
	if s == 'X++' or s == '++X':
		k += 1
	else:
		k -= 1
print(k)


n = int(input())
c = 0
for i in range(n):
	l = list(input().split('X'))
	for j in l:
		if j == '++':
			c += 1
		elif j == '--':
			c -= 1
print(c)


plus = ()
plus = ('++X', '+X+', 'X++')
k = 0
n = int(input())
for i in range(0, n):
	c = input()
	if (c == '++X') | (c == '--X') | (c == '-X-') | (c == '+X+') | (c == 'X++') | (c == 'X--'):
		if c in plus:
			k = k + 1
		else:
			k = k - 1
print(k)


def getLines(num):
	inputLines = []
	for i in range(0, num):
		line = input()
		if line:
			inputLines.append(line)
		else:
			break
	return inputLines
rc = int(input())
lines = getLines(rc)
result = 0
for l in lines:
	if '+' in l:
		result += 1
	if '-' in l:
		result -= 1
print(result)


n = int(input())
lst = []
x = 0
for i in range(n):
	lst.append(input())
	if lst[i][:2] == '++' or lst[i][1:] == '++':
		x += 1
	else:
		x -= 1
print(x)


num = int(input(''))
x = 0
new = ''
for i in range(num):
	new = str(input(''))
	if new == 'X++':
		x = x + 1
	elif new == '++X':
		x = x + 1
	elif new == 'X--':
		x = x - 1
	elif new == '--X':
		x = x - 1
print(x)


n = int(input())
p = 0
for i in range(n):
	k = input()
	if k == '++X' or k == 'X++':
		p = p + 1
	elif k == '--X' or k == 'X--':
		p = p - 1
	else:
		p = p
print(p)


import sys
x = 0
a = sys.stdin.read()
b = a.split()
for i in range(1, int(b[0]) + 1):
	if b[i] == '++X' or b[i] == 'X++':
		x += 1
	elif b[i] == '--X' or b[i] == 'X--':
		x -= 1
print(x)


n = int(input())
r = 0
for x in range(n):
	a = input()
	if a.count('-') == 2:
		r -= 1
	if a.count('+') == 2:
		r += 1
print(r)


import math
n = int(input(), 10)
tabela = [None] * n
for num in range(n):
	tabela[num] = input()
count = 0
for statement in tabela:
	if '-' in statement:
		count -= 1
	else:
		count += 1
print(count)


fL = int(input())
X = 0
for line in range(0, fL):
	operation = input()
	if operation == 'X++' or operation == '++X':
		X += 1
	else:
		X -= 1
print(X)


import sys
for line in sys.stdin:
	line = line.rstrip()
	iterations = int(line)
	counter = 0
	for iteration in range(iterations):
		inputt = input()
		if '+' in inputt:
			counter += 1
		else:
			counter -= 1
	print(counter)


n = int(input(''))
x = 0
code = []
for i in range(n):
	code.append(input(''))
for line in code:
	if '++' in line:
		x += 1
	else:
		x -= 1
print(x)


def main():
	t = int(input())
	val = 0
	for _ in range(t):
		x = input().strip()
		if x == '++X' or x == 'X++':
			val += 1
		elif x == 'X--' or x == '--X':
			val -= 1
	print(val)
main()


n = int(input())
x = 0
for i in range(n):
	plus = 0
	minus = 0
	pieces = list(input())
	for i in pieces:
		if i is '+':
			plus += 1
		elif i is '-':
			minus += 1
	x = x + int(plus / 2) - int(minus / 2)
print(x)


n = int(input())
val = 0
for _ in range(n):
	ls = list(input())
	plus = ls.count('+')
	minus = ls.count('-')
	if plus > 0:
		val += 1
	else:
		val -= 1
print(val)


n = int(input())
operations = []
for i in range(n):
	operations.append(input())
output = 0
for i in operations:
	if '--' in i:
		output = output - 1
	else:
		output = output + 1
print(output)


x = 0
n = int(input())
s = []
for i in range(n):
	k = str(input())
	s = s + [k]
for i in range(n):
	if s[i] == 'X++' or s[i] == '+X+' or s[i] == '++X':
		x = x + 1
	if s[i] == '--X' or s[i] == 'X--' or s[i] == '-X-':
		x = x - 1
print(x)


inp = input()
x = 0
for i in range(0, int(inp)):
	ninp = input()
	if ninp == '++X' or ninp == 'X++':
		x += 1
	else:
		x -= 1
print(x)


try:
	n = int(input())
	x = 0
	for i in range(n):
		s = str(input())
		if s == '++X' or s == 'X++':
			x = x + 1
		elif s == '--X' or s == 'X--':
			x = x - 1
	print(x)
except:
	pass


a = int(input())

def splitter(b):
	c = b.split('X')
	return c
X = 0
while a > 0:
	c = splitter(input())
	if c[0] == '++':
		X += 1
		a -= 1
		continue
	elif c[1] == '++':
		X += 1
		a -= 1
		continue
	else:
		X -= 1
		a -= 1
		continue
print(X)


no_statement = int(input())
all_state = []
x = 0
for i in range(no_statement):
	statement = input()
	all_state.append(statement)
for item in all_state:
	if '+' in item:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
an = 0
for _ in range(n):
	a = input()
	if a[1] == '+':
		an += 1
	if a[1] == '-':
		an -= 1
print(an)


test = int(input())
val = 0
while test > 0:
	query = input()
	if query[0] is '+' or query[len(query) - 1] is '+':
		val += 1
	elif query[0] is '-' or query[len(query) - 1] is '-':
		val -= 1
	test -= 1
print(val)


def seperateints(x):
	k = ''
	l = []
	for i in x:
		if i == ' ':
			l.append(int(k))
			k = ''
			continue
		k = k + i
	l.append(int(k))
	return l
x = int(input())
l = []
for i in range(x):
	l.append(input())
n = 0
for i in l:
	for k in i:
		if k == '+':
			n += 1
			break
		if k == '-':
			n -= 1
			break
print(n)


n = int(input())
list1 = []
for i in range(n):
	tmp = input().split()
	list1.append(tmp)
list2 = []
list3 = [['++X'], ['X++']]
for value in list1:
	if value in list3:
		list2.append(1)
	else:
		list2.append(-1)
total = 0
for i in range(len(list2)):
	total += list2[i]
print(total)


n = int(input())
num = 0
for k in range(n):
	order = input()
	if order == '++X' or order == 'X++':
		num += 1
	else:
		num -= 1
print(num)


cases = int(input())
val = 0
for i in range(cases):
	a = input()
	if '+' in a:
		val += 1
	else:
		val -= 1
print(val)


x = 0
total = int(input())
for i in range(0, total):
	word = input()
	if word.find('-') != -1:
		x -= 1
	else:
		x += 1
print(x)


n = int(input())
result = 0
for _ in range(n):
	stmt = input()
	if stmt == '++X' or stmt == 'X++':
		result += 1
	else:
		result -= 1
print(result)


n = int(input())
m = 0
for i in range(n):
	op = str(input())
	if op == 'X++' or op == '++X':
		m += 1
	else:
		m -= 1
print(m)


w = int(input())
(v, mm, n) = (0, 0, 0)
for i in range(w):
	c = input()
	if c == '++X' or c == 'X++':
		n += 1
	elif c == '--X' or c == 'X--':
		n -= 1
print(n)


l_cnt = int(input())
lines = [input() for i in range(l_cnt)]
x = 0
for l in lines:
	if '--' in l:
		x -= 1
	elif '++' in l:
		x += 1
print(x)


n = int(input())
i = 0
X = 0
for i in range(n):
	(a, b, c) = map(str, input())
	if a == '+' or b == '+' or c == '+':
		X += 1
	if a == '-' or b == '-' or c == '':
		X -= 1
print(X)


n = int(input())
r = 0
for i in range(0, n):
	s = str(input())
	if s[0] == '+' or s[2] == '+':
		r = r + 1
	else:
		r = r - 1
print(r)


n = int(input())
x = []
for each in range(n):
	x.append(1 if '++' in input() else -1)
print(sum(x))


count1 = 0
count2 = 0
t = int(input())
for i in range(t):
	c = input()
	l = len(c)
	for j in range(l):
		if c[j] == '-':
			count1 += 1
			break
		elif c[j] == '+':
			count2 += 1
			break
print(count2 - count1)


t = int(input())
c = '++'
ch = '--'
count = 0
for i in range(t):
	s = input()
	if c in s:
		count = count + 1
	else:
		count = count - 1
print(count)


tries = int(input())
res = 0
for _ in range(tries):
	if '+' in input():
		res += 1
	else:
		res -= 1
print(res)


import sys
x = input()
x = int(x)
l = 0
while x > 0:
	str = input()
	if str == '++X' or str == 'X++':
		l += 1
	else:
		l -= 1
	x -= 1
print(l)


_x = int(input())
x = 0
for i in range(_x):
	_ = str(input())
	if _[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


def list_inp(list, n):
	for i in range(0, n):
		tmp = input()
		list.append(tmp)
n = int(input())
lst = []
list_inp(lst, n)
x = 0
for i in range(0, n):
	if lst[i] == '++X' or lst[i] == 'X++':
		x += 1
	else:
		x -= 1
print(x)


N = int(input())
X = 0
while N:
	N -= 1
	S = input().replace('X', '')
	if S == '++':
		X += 1
	else:
		X -= 1
print(X)


out = 0
n = int(input())
for i in range(n):
	st = input()
	if '+' in st:
		out += 1
	else:
		out -= 1
print(out)


n = int(input())
x = 0
while n > 0:
	oper = input()
	if oper[1] == '+':
		x += 1
	else:
		x -= 1
	n -= 1
print(x)


import math
n = int(input())
x = 0
while n > 0:
	line = input()
	if '++' in line:
		x += 1
	elif '--' in line:
		x -= 1
	n -= 1
print(x)


amount = int(input())
number = 0
for i in range(amount):
	v = input()
	if v == 'X++' or v == '++X':
		number += 1
	if v == 'X--' or v == '--X':
		number -= 1
print(number)


t = int(input())
x = 0
for i in range(t):
	com = str(input())
	if '+' in com:
		x = x + 1
	else:
		x = x - 1
print(int(x))


a = int(input())
sum1 = 0
while a > 0:
	list1 = []
	list1 = input()
	if list1[1] == '+':
		sum1 += 1
	else:
		sum1 -= 1
	a -= 1
print(sum1)


def solve(statements):
	minus = sum((line.count('--') for line in statements))
	plus = sum((line.count('++') for line in statements))
	return plus - minus
n = int(input())
statements = []
while n > 0:
	statements.append(input())
	n -= 1
print(solve(statements))


n = int(input())
l = [input() for i in range(n)]

def bit(x):
	a = 0
	if x == 'x++' or x == '++x':
		a += 1
	elif x == 'x--' or x == '--x':
		a -= 1
	else:
		a = 0
	return a
s = 0
for j in range(0, len(l)):
	s += int(bit(l[j].lower()))
print(s)


number = int(input())
statement = []
value = 0
for i in range(number):
	tmp = input().upper()
	statement.append(tmp)
	if statement[i] == '++X' or statement[i] == 'X++':
		value += 1
	elif statement[i] == '--X' or statement[i] == 'X--':
		value -= 1
print(value)


def plusMinus(x, s):
	if s == '++X':
		x = x + 1
	elif s == 'X++':
		x = x + 1
	elif s == '--X':
		x = x - 1
	else:
		x = x - 1
	return x
X = 0
l = []
n = int(input())
for i in range(n):
	l.append(input())
for i in l:
	X = plusMinus(X, i)
print(X)


n = int(input())
c = 0
for i in range(n):
	s = input()
	for j in range(len(s)):
		if s[j] == '+':
			c += 1
			break
		if s[j] == '-':
			c -= 1
			break
print(c)


n = int(input())
N = 0
for i in range(n):
	t = input()
	if t[1] == '+':
		N += 1
	if t[1] == '-':
		N -= 1
print(N)


n = int(input())
lst = list()
x = 0
for i in range(n):
	lst.append(input())
for i in range(n):
	if lst[i] == '++X' or lst[i] == 'X++':
		x = x + 1
	if lst[i] == 'X--' or lst[i] == '--X':
		x = x - 1
print(x)


try:
	m = int(input())
	c = 0
	while m:
		y = input()
		y = list(y)
		if '+' in y:
			c += 1
		else:
			c -= 1
		m -= 1
	print(c)
except:
	pass


x = 0
for i in range(int(input())):
	str = input()
	for i in str:
		if i == '+':
			x += 1
			break
		elif i == '-':
			x -= 1
			break
print(x)


import sys

def solve():
	n = int(input())
	x = 0
	for i in range(n):
		s = input()
		if '++' in s:
			x += 1
		else:
			x -= 1
	print(x)
solve()


import re
n = int(input())
statements = []
plus = 0
minus = 0
for i in range(0, n):
	statements.append(input())
for statement in statements:
	string = re.search('[+]{2}', statement)
	if string:
		plus += 1
	else:
		minus += 1
print(plus - minus)


n = int(input())
x = 0
for i in range(n):
	s = input()
	if s.startswith('X'):
		operation = s[1:]
	else:
		operation = s[:-1]
	if operation == '++':
		x += 1
	else:
		x -= 1
print(x)


n = 0
for i in range(int(input())):
	c = input().split('X')
	if c[0] == '++' or c[1] == '++':
		n += 1
	elif c[0] == '--' or c[1] == '--':
		n -= 1
print(n)


import sys
n = int(input())
x = 0
for line in sys.stdin:
	if '+' in line:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
b = 0
o = 0
while b < n:
	b += 1
	x = input()
	if '++' in x:
		o += 1
	elif '-' in x:
		o -= 1
print(o)


sum = 0
for i in range(int(input())):
	j = input()
	sum += '++' in j
	sum -= '--' in j
print(sum)


from math import *
x = 0
n = int(input())
for i in range(n):
	expr = input()
	if expr == 'X++':
		x = eval('x+1')
	if expr == '++X':
		x = eval('x+1')
	if expr == 'X--':
		x = eval('x-1')
	if expr == '--X':
		x = eval('x-1')
print(x)


n = int(input())
s = None
x = 0
for i in range(0, n):
	s = input()
	if s[0] == '-' or s[1] == '-':
		x -= 1
	if s[0] == '+' or s[1] == '+':
		x += 1
print(x)


def main():
	s = int(input())
	output = 0
	for i in range(s):
		p = input()
		if '+' in p:
			output += 1
		else:
			output -= 1
	print(output)
main()


n = int(input())
ans = 0
for i in range(n):
	s = input()
	if s[0] == '+' or s[len(s) - 1] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


x = 0
select = int(input())
for n in range(select):
	value = input()
	if value[1] == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


import sys
input = sys.stdin.readline

def inp():
	return int(input())
input1 = inp()
res = 0
for i in range(input1):
	operation = input()
	if '++' in operation:
		res += 1
	elif '--' in operation:
		res -= 1
else:
	print(res)


n = int(input())
inputs = [None] * n
x = 0
for i in range(n):
	inputs[i] = input()
for i in range(n):
	if inputs[i][1] == '-':
		x -= 1
	elif inputs[i][1] == '+':
		x += 1
print(x)


input_list = []
num = 0
while True:
	if num != 0 and num == int(input_list[0]) + 1:
		break
	line = input()
	input_list.append(line)
	num += 1
input_list.__delitem__(0)
count = 0
for item in input_list:
	if '+' in item:
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
x = 0
for sent in range(n):
	sent = input()
	if sent[0] == '+' or sent[-1] == '+':
		x += 1
	elif sent[0] == '-' or sent[-1] == '-':
		x -= 1
print(x)


n = int(input())
x = 0
for i in range(0, n):
	s = input()
	for ch in s:
		if ch == '+':
			x += 1
			break
		if ch == '-':
			x -= 1
			break
print(x)


a = int(input())
l = []
k = []
for j in range(a):
	f = input()
	l.append(f)
for y in l:
	if y == 'X++' or y == '++X':
		y = 1
		k.append(y)
	if y == '--X' or y == 'X--':
		y = -1
		k.append(y)
print(sum(k))


import sys
noofterms = int(input())
sum = 0
while noofterms > 0:
	noofterms -= 1
	op = input()
	if '++' in op:
		sum += 1
	else:
		sum -= 1
print(sum)


t = int(input())
x = 0
for cas in range(t):
	s = input()
	if s[0] == '+' or s[2] == '+':
		x += 1
	else:
		x -= 1
print(x)


t = int(input())
res = 0
while t > 0:
	s = input()
	if s.find('+') != -1:
		res = res + 1
	else:
		res = res - 1
	t = t - 1
print(res)


def main():
	num = int(input())
	oprs = []
	x = 0
	while num > 0:
		oprs.append(input())
		num -= 1
	for opr in oprs:
		if '++' in opr:
			x += 1
		else:
			x -= 1
	print(x)
main()


bit = int(input())
x = 0
for i in range(bit):
	op = input()
	if op == '++X' or op == 'X++':
		x += 1
	else:
		x -= 1
print(x)


a = int(input())
c = 0
while a > 0:
	b = input()
	if '++' in b:
		c += 1
	if '--' in b:
		c -= 1
	a -= 1
print(c)


from collections import Counter
import math
import sys
from bisect import bisect, bisect_left, bisect_right

def input():
	return sys.stdin.readline().strip()

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def mod():
	return 10 ** 9 + 7
n = INT()
ans = 0
for i in range(n):
	s = input()
	x = s.count('+') // 2
	y = s.count('-') // 2
	ans += x
	ans -= y
print(ans)


n = int(input())
x = 0
for i in range(n):
	stat = input()
	variable = stat.index('X')
	if variable == 0:
		mark = stat[2]
	elif variable == 2:
		mark = stat[0]
	if mark == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


ans = 0
for i in [0] * int(input()):
	s = input()
	if s[0] == '+' or s[-1] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
x = 0
for i in range(n):
	y = input()
	for j in range(len(y)):
		if y[j] == '+':
			x += 1
			break
		elif y[j] == '-':
			x -= 1
			break
print(x)


import string
operations = int(input(''))
result = 0
liste = list()
for i in range(operations):
	liste.append(str(input('')))
for i in liste:
	if i == '++X' or i == 'X++':
		result += 1
	elif i == '--X' or i == 'X--':
		result -= 1
print(result)


n = int(input())
flag = 0
for i in range(n):
	strin = input()
	if strin == 'X++' or strin == '++X':
		flag += 1
	elif strin == 'X--' or strin == '--X':
		flag -= 1
print(flag)


anzahl = int(input())
A = []
summe = 0
for i in range(anzahl):
	A.append(input())
	if '+' in A[i]:
		summe += 1
	else:
		summe -= 1
print(summe)


t = int(input())
n = 0
for i in range(t):
	b = str(input())
	if b[0] == '+' or b[1] == '+':
		n += 1
	else:
		n -= 1
print(n)


n = int(input())
c = 0
for i in range(n):
	t = input()
	s = t.replace('X', '')
	l = list(s)
	for i in range(len(l) - 1):
		if l[i] == '+' and l[i + 1] == '+':
			c = c + 1
		elif l[i] == '-' and l[i + 1] == '-':
			c = c - 1
print(c)


statments = []
n = int(input())
for i in range(n):
	statement = input()
	statments.append(statement)
x = 0
for st in statments:
	if '++' in st:
		x = x + 1
	else:
		x = x - 1
print(x)


from sys import stdin
rows = int(stdin.readline())
num = 0
if rows >= 0 and rows <= 150:
	i = 0
	while i < rows:
		op = stdin.readline()
		if len(op) != 0:
			if '++' in op:
				num = num + 1
			elif '--' in op:
				num = num - 1
			else:
				print('Error')
		i = i + 1
else:
	print('Error')
print(num)


X = 0
i = int(input())
for j in range(i):
	k = input()
	if k in ['++X', '++x', 'x++', 'X++']:
		X = X + 1
	elif k in ['--X', '--x', 'X--', 'x--']:
		X = X - 1
print(X)


times = int(input())
x = 0
for time in range(times):
	statement = input()
	if statement[1] == '+':
		x += 1
	elif statement[1] == '-':
		x -= 1
print(x)


a = int(input())
b = 0
for _ in range(a):
	c = input()
	if '--' in c:
		b -= 1
	elif '++' in c:
		b += 1
print(b)


a = int(input())
out = 0
for i in range(a):
	x = str(input())
	if '++' in x:
		out += 1
	if '--' in x:
		out -= 1
print(out)


n = int(input())
add = 0
minus = 0
result = 0
for i in range(n):
	a = input()
	add += a.count('++')
	minus += a.count('--')
result += add
result -= minus
print(result)


n = int(input())
inc = 0
dec = 0
ops = [input() for i in range(n)]
for op in ops:
	if op == 'X++' or op == '++X':
		inc += 1
	else:
		dec += 1
print(inc - dec)


n = int(input().rstrip())
code = []
for i in range(n):
	arr = input()
	code.append(list(arr))

def main(code):
	ans = 0
	for i in code:
		for j in i:
			if j == '+':
				ans += 1
				break
			elif j == '-':
				ans -= 1
				break
	return ans
ans = main(code)
print(ans)


r = 0
X = 0
for i in [0] * int(input()):
	s = input()
	if '+' in s:
		r += 1
	else:
		r -= 1
print(r)


s = int(input())
t = 0
for x in range(s):
	a = input()
	if a in '++X' or a in 'X++':
		t += 1
	else:
		t -= 1
print(t)


x = int(input())
tot = 0
for i in range(x):
	comm = input()
	if comm[:2] == '++' or comm[1:] == '++':
		tot += 1
	else:
		tot -= 1
print(tot)


n = input()
n = int(n)
counter = 0
for i in range(0, n):
	temp = input()
	if temp[1:2] == '+':
		counter = counter + 1
	elif temp[1:2] == '-':
		counter = counter - 1
print(counter)


n = int(input())
x = 0
for _ in range(n):
	bit = input()
	if bit.count('+') == 2:
		x += 1
	elif bit.count('-') == 2:
		x -= 1
print(x)


a = int(input())
i = 0
arr1 = []
while i < a:
	x = input()
	arr1.append(x)
	i += 1
i = 0
for X in arr1:
	if X == 'X++' or X == '++X':
		i = i + 1
	elif X == 'X--' or X == '--X':
		i = i - 1
print(i)


count = 0
for _ in range(int(input())):
	st = list(input())
	for x in st:
		if x == '+':
			count += 1
			break
		elif x == '-':
			count -= 1
			break
print(count)


n = int(input())
c = 0
for i in range(0, n):
	s = str(input())
	w = s.split('X')
	for char in w:
		if char == '++':
			c = c + 1
		elif char == '--':
			c = c - 1
print(c)


inp = int(input())
list = []
for i in range(inp):
	op = input()
	list.append(op)
total = 0
for things in list:
	if things == '++X' or things == 'X++':
		total += 1
	else:
		total -= 1
print(total)


n = int(input())
s = ''
val = 0
for i in range(n):
	s = input()
	s = s.replace('X', '')
	if s == '++':
		val += 1
	elif s == '--':
		val -= 1
print(val)


X = 0
n = int(input())
for _ in range(n):
	a = input()
	if a == 'X++' or a == '++X':
		X = eval('X + 1')
	else:
		X = eval('X - 1')
print(X)


m = int(input())
output = 0
for i in range(m):
	n = input()
	if n == 'X--' or n == '--X':
		output = output - 1
	elif n == '++X' or n == 'X++':
		output = output + 1
	elif n == 'X++' and n == '--X':
		output = 0 + 0
print(output)


number_of_times = int(input())
x = 0
for i in range(number_of_times):
	statement = input()
	if statement[0] == '+' and statement[1] == '+' or (statement[1] == '+' and statement[2] == '+') or (statement[0] == '+' and statement[2] == '+'):
		x += 1
	elif statement[0] == '-' and statement[1] == '-' or (statement[1] == '-' and statement[2] == '-') or (statement[0] == '-' and statement[2] == '-'):
		x -= 1
print(x)


t = int(input())
count = 0
for i in range(t):
	string = str(input())
	if string == 'X++' or string == '++X':
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
p = []
x = 0
for i in range(n):
	s = str(input())
	p += s
	for j in p:
		if j == '+':
			x += 1
			break
		if j == '-':
			x -= 1
			break
	p = []
print(x)


n = int(input())
x = 0
for i in range(n):
	t = input()
	if t[1] == '+':
		x += 1
print(2 * x - n)


n = int(input())
f = 0
for i in range(n):
	s = str(input())
	countp = 0
	countm = 0
	for j in range(len(s)):
		if s[j] == '+':
			countp = countp + 1
		elif s[j] == '-':
			countm = countm + 1
		else:
			pass
	f = f + int(countp / 2)
	f = f - int(countm / 2)
print(f)


n = int(input())
counter = 0
for _ in range(n):
	statement = input()
	if '+' in statement:
		counter += 1
	elif '-' in statement:
		counter -= 1
print(counter)


n = int(input())
minus = '--'
plus = '++'
count = 0
for i in range(n):
	command = input()
	if '+' in command:
		count += 1
	elif '-' in command:
		count -= 1
print(count)


t = int(input())
k = 0
for i in range(t):
	N = str(input())
	if N == 'X++' or N == '++X':
		k = k + 1
	else:
		k = k - 1
print(k)


n = int(input())
ans = 0
while n:
	s = input()
	if '-' in s:
		ans -= 1
	else:
		ans += 1
	n -= 1
print(ans)


x = 0
n = int(input())
if n > 0:
	while n > 0:
		bit = input()
		if '+' in bit:
			x += 1
		elif '-' in bit:
			x -= 1
		n -= 1
print(x)


n = int(input())
x = 0

def oper(string):
	flag = 3
	for i in range(0, 3):
		if string[i] == '+':
			flag = 1
		if string[i] == '-':
			flag = 0
	return flag
for i in range(0, n):
	string = input()
	if oper(string) == 1:
		x = x + 1
	else:
		x = x - 1
print(x)


n = int(input())
x = 0
for cont in range(0, n):
	op = input()
	for d in op:
		if d == '+':
			x += 1
			break
		elif d == '-':
			x -= 1
			break
print(x)


def func():
	n = int(input())
	r = 0
	for i in range(n):
		s = input()
		if s == '++X' or s == 'X++':
			r += 1
		if s == '--X' or s == 'X--':
			r -= 1
	print(r)
func()


n = int(input())
l = []
x = 0
for i in range(n):
	l.append(str(input()))
for i in range(n):
	if 'x++X++X++x'.find(str(l[i])) != -1:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for _ in range(n):
	scan = input()
	if scan == '++X' or scan == 'X++':
		x += 1
	elif scan == '--X' or scan == 'X--':
		x -= 1
print(x)


def main():
	total_statements = int(input())
	variable_x = 0
	for _ in range(total_statements):
		statement = input()[1]
		if statement == '+':
			variable_x += 1
		else:
			variable_x -= 1
	print(variable_x)
main()


x = 0
n = int(input())
for i in range(0, n):
	string = input()
	for j in range(0, len(string)):
		if string[j] == '+':
			x += 1
			break
		if string[j] == '-':
			x -= 1
			break
print(x)


n = int(input())
i = 0
x = 0
while i < n:
	y = str(input())
	if y[0:2] == '++' or y[1:3] == '++':
		x += 1
	elif y[0:2] == '--' or y[1:3] == '--':
		x -= 1
	i += 1
print(x)


t = int(input(''))
co = 0
for i in range(t):
	srt = input('')
	if srt[1] == '+':
		co += 1
	elif srt[1] == '-':
		co = co - 1
print(co)


x = 0
for i in range(int(input())):
	v = input()
	if 'X' in v and '++' in v:
		x += 1
	elif 'X' in v and '--' in v:
		x -= 1
print(x)


x = 0
qtd = int(input())
for i in range(qtd):
	comando = input()
	if comando[0] in ['-', '+']:
		if comando[0] == '-':
			x -= 1
		else:
			x += 1
	elif comando[-1] == '-':
		x -= 1
	else:
		x += 1
print(x)


n = int(input())
t = []
x = 0
for i in range(n):
	m = str(input())
	t = list(m)
	if t[1] == '+':
		x += 1
	elif t[1] == '-':
		x -= 1
	else:
		break
print(x)


num = int(input())
a = []
for i in range(num):
	statement = input()
	a.append(statement)
X = 0
for element in a:
	if element == '++X':
		X += 1
	if element == 'X++':
		X += 1
	if element == 'X--':
		X = X - 1
	if element == '--X':
		X = X - 1
print(X)


def main():
	t = int(input())
	x = 0
	for _ in range(t):
		s = list(input())
		for c in s:
			if c == '+':
				x += 1
				break
			elif c == '-':
				x -= 1
				break
	print(x)
main()


add = ['X++', '++X']
sub = ['X--', '--X']
x = 0
num = int(input())
x = 0
for i in range(0, num):
	op = str(input())
	if op in add:
		x = x + 1
	elif op in sub:
		x = x - 1
print(x)


def bitPlus(statment):
	if statment[0] == '-' or statment[-1] == '-':
		return -1
	if statment[0] == '+' or statment[-1] == '+':
		return 1
n = int(input())
res = 0
for _ in range(n):
	stm = input()
	res += bitPlus(stm)
print(res)


l = int(input())
s = 0
for i in range(l):
	a = str(input())
	a = a.lower()
	if a == 'x++' or a == '++x':
		s += 1
	elif a == 'x--' or a == '--x':
		s -= 1
print(s)


n = int(input())
statements = []
X = 0
for i in range(n):
	statements.append(input())
for statement in statements:
	if '+' in statement:
		X += 1
	elif '-' in statement:
		X -= 1
print(X)


sum = 0
t = int(input())
for i in range(0, t, 1):
	a = str(input())
	if a[0] == '+' or a[1] == '+':
		sum += 1
	elif a[0] == '-' or a[1] == '-':
		sum -= 1
print(sum)


a = int(input())
counter = 0
for _ in range(a):
	line = input()
	if line == 'X++' or line == '++X':
		counter += 1
	else:
		counter -= 1
print(counter)


N = int(input())
x = 0
for n in range(N):
	s = input()
	t = s.find('-')
	if t == -1:
		x += 1
	else:
		x -= 1
print(x)


s = 0
for _ in range(int(input())):
	i = input()
	s += i.count('+') - i.count('-')
print(s // 2)


n = int(input())
operation_list = []
for i in range(n):
	operation_list.append(input())
x = 0
for opration in operation_list:
	if opration == '++X' or opration == 'X++':
		x += 1
	elif opration == '--X' or opration == 'X--':
		x -= 1
	else:
		pass
print(x)


import sys
operations = [operation.rstrip() for operation in sys.stdin]
value = 0
for operation in operations[1:]:
	if operation[:2] == '++' or operation[1:] == '++':
		value += 1
	elif operation[:2] == '--' or operation[1:] == '--':
		value -= 1
print(value)


X = 0
for _ in range(int(input())):
	s = input()
	for i in range(len(s) - 1):
		if s[i] == '+' and s[i + 1] == '+':
			X += 1
		elif s[i] == '-' and s[i + 1] == '-':
			X -= 1
print(X)


ans = 0
for i in range(int(input())):
	s = input()
	s1 = ''.join(sorted(s))
	if s1 == '++X':
		ans += 1
	elif s1 == '--X':
		ans -= 1
print(ans)


value = 0
flag = False
t = int(input())
for _ in range(t):
	inin = input()
	if inin == 'X++' or inin == '++X':
		value += 1
	elif inin == 'X--' or inin == '--X':
		value -= 1
print(value)


x = 0
n = int(input())
for _ in range(n):
	line = input()
	if line.find('++') >= 0:
		x += 1
	elif line.find('--') >= 0:
		x -= 1
print(x)


x = 0
for _ in range(int(input())):
	a = input().lower()
	if a in ('x++', '++x'):
		x += 1
	elif a in ('--x', 'x--'):
		x -= 1
print(x)


from sys import stdin

def main():
	n = int(stdin.readline())
	x = 0
	for w in stdin.readlines():
		if '+' in w:
			x += 1
		elif '-' in w:
			x -= 1
	print(x)
main()


amount = int(input())
x = 0
for i in range(amount):
	operator = input()
	if operator == 'X++' or operator == '++X':
		x += 1
	elif operator == '--X' or operator == 'X--':
		x -= 1
print(x)


n = int(input())
temp = ''
ris = 0
for _ in range(n):
	temp += input()
	plus = temp.count('+') // 2
	minus = temp.count('-') // 2
ris += plus
ris -= minus
print(ris)


print(sum([1 if '+' in input() else -1 for x in range(int(input()))]))


N = int(input())
value = 0
for i in range(N):
	curr = str(input())
	if '-' in curr:
		value -= 1
	else:
		value += 1
print(value)


x = 0
linum = int(input())
for i in range(linum):
	inp = input()
	if '+' in inp:
		x += 1
	else:
		x += -1
print(x)


n = int(input())
(counter_plus, counter_minus) = (0, 0)
for i in range(n):
	buff = input()
	counter_plus += buff.count('++')
	counter_minus += buff.count('--')
print(counter_plus - counter_minus)


n = int(input())
c = 0
one = [input() for i in range(n)]
for i in range(len(one)):
	s = one[i]
	if s[1] == '+':
		if s[0] == '+' or s[2] == '+':
			c += 1
	if s[1] == '-':
		if s[0] == '-' or s[2] == '-':
			c -= 1
print(c)


soma = 0
for _ in range(int(input())):
	if input()[1] == '+':
		soma += 1
	else:
		soma -= 1
print(soma)


n = int(input())
val = 0
for _ in range(n):
	op = input()
	if '-' in op:
		val += -1
	elif '+' in op:
		val += 1
print(val)


n = int(input())
s = 0
while n > 0:
	n -= 1
	m = input()
	if m[1] == '+':
		s += 1
	else:
		s -= 1
print(s)


x = int(input())
ans = 0
for i in range(1, x + 1):
	y = input()
	if y[0] == '+' or y[2] == '+':
		ans += 1
	elif y[0] == '-' or y[2] == '-':
		ans -= 1
print(ans)


x = int(input())
a = []
for i in range(x):
	h = 0
	c = input()
	a.append(c)
for i in range(x):
	if a[i] == 'X--' or a[i] == '--X':
		h = h - 1
	if a[i] == 'X++' or a[i] == '++X':
		h = h + 1
print(h)


value = 0
for i in range(int(input())):
	inpt2 = input()
	if inpt2 == 'X++' or inpt2 == '++X':
		value += 1
	elif inpt2 == '--X' or inpt2 == 'X--':
		value -= 1
print(value)


n = int(input())
x = 0
for i in range(n):
	op = str(input())
	if op.find('++') != -1:
		x += 1
	if op.find('--') != -1:
		x -= 1
print(x)


a = int(input())
x = 0
s = []
for i in range(a):
	h = input()
	s.append(h)
for k in range(a):
	if (s[k] == '++X') | (s[k] == 'X++'):
		x = x + 1
	elif (s[k] == 'X--') | (s[k] == '--X'):
		x = x - 1
print(x)


n = int(input())
list = []
c = 0
for i in range(0, n):
	expression = input()
	list.append(expression)
for j in range(0, len(list)):
	if list[j] == '++X' or list[j] == 'X++':
		c = c + 1
	else:
		c = c - 1
print(c)


a = int(input())
X = 0
d = 0
for i in range(a):
	z = input()
	if '++' in z:
		d += 1
	else:
		d -= 1
print(d)


n = int(input())
cnt = 0
for i in range(0, n):
	w = input()
	if w == 'X++':
		cnt += 1
	elif w == '++X':
		cnt += 1
	elif w == 'X--':
		cnt -= 1
	else:
		cnt -= 1
print(cnt)


num = int(input())
totalvalue = 0
for string in range(num):
	userinput = str(input())
	if '-' in userinput:
		totalvalue = totalvalue - 1
	else:
		totalvalue = totalvalue + 1
print(totalvalue)


test = int(input())
value = 0
for i in range(test):
	first = input()
	if '+' in first:
		value += 1
	else:
		value -= 1
print(value)


print(eval('0' + '1'.join([input()[1] for i in range(int(input()))]) + '1'))


x = 0
for _ in range(int(input())):
	temp = input()
	if '+' in temp:
		x += 1
		continue
	if '-' in temp:
		x -= 1
		continue
print(x)


n = int(input())
c = 0
while n != 0:
	x = input()
	if '++' in x:
		c += 1
	if '--' in x:
		c -= 1
	n -= 1
print(c)


x = 0
n = int(input())
for i in range(0, n):
	statement = input()
	if statement.find('++') is not -1:
		x += 1
	else:
		x -= 1
print(x)


n = int(input(''))
x = 0
(c1, c2) = (0, 0)
for i in range(n):
	y = input('')
	if y == 'X++' or y == '++X':
		c1 += 1
	elif y == 'X--' or y == '--X':
		c2 += 1
print(c1 - c2)


c = int(input())
i = 0
x = 0
while i < c:
	a = input()
	if '+' in a:
		x = x + 1
	else:
		x = x - 1
	i += 1
print(x)


n = int(input())
X = 0
for operation in range(n):
	if '++' in input():
		X += 1
	else:
		X -= 1
print(X)


n = int(input())
mylist = []
num = 0
while n:
	mystr = input()
	mylist.append(mystr)
	n -= 1
for x in mylist:
	if x == '++X' or x == 'X++':
		num = num + 1
	else:
		num = num - 1
print(num)


n = int(input())
z = 0
while n > 0:
	s = list(input())
	if '+' in s:
		z += 1
	else:
		z -= 1
	n -= 1
print(z)


n = int(input())
res = 0

def add(s):
	return 1 if s[1] == '+' else -1
for i in range(0, n):
	res += add(input())
print(res)


inp = int(input())
res = 0
for i in range(inp):
	string = input()
	if string == 'X++' or string == '++X':
		res = res + 1
	elif string == '--X' or 'X--':
		res = res - 1
print(res)


n = int(input())
v = 0
for i in range(n):
	tmp = input()
	if tmp == 'X++' or tmp == '++X':
		v += 1
	else:
		v -= 1
print(v)


n = int(input())
x = 0
for i in range(n):
	txt = input()
	if not txt.find('++') == -1:
		x += 1
	elif not txt.find('--') == -1:
		x -= 1
print(x)


x = int(input())
a = []
b = 0
for i in range(x):
	a = input().upper()
	if '++' in a:
		b += 1
	if '--' in a:
		b -= 1
print(b)


i = int(input())
wyn = 0
for x in range(i):
	p = input()
	if '++' in p:
		wyn += 1
	else:
		wyn -= 1
print(wyn)


n = int(input())
s = 0
for i in range(0, n):
	a = input()
	s = s - a.count('-') // 2 + a.count('+') // 2
print(s)


s = ''.join([input() for i in range(int(input()))])
print((s.count('+') - s.count('-')) // 2)


count = 0
statements = int(input())
i = 0
l = []
while i < statements:
	l.append(input())
	i += 1
for element in l:
	if element == '++X' or element == 'X++' or element == '+X+':
		count += 1
	else:
		count -= 1
print(count)


t = int(input())
count = 0
for _ in range(t):
	string = input()
	if string == 'X++' or string == '++X':
		count += 1
	elif string == '--X' or string == 'X--':
		count -= 1
print(count)


g = int(input())
total = 0
for i in range(0, g):
	h = list(input())
	if h[0] == '-' or h[1] == '-' or h[2] == '-':
		total -= 1
	elif h[0] == '+' or h[1] == '+' or h[2] == '+':
		total += 1
print(total)


N = int(input())
X = 0
for _ in range(N):
	if '-' in input():
		X -= 1
	else:
		X += 1
print(X)


x = 0
n = int(input())
while n > 0:
	st = input()
	if st[0] == '+' or st[-1] == '+':
		x += 1
	else:
		x -= 1
	n -= 1
print(x)


n = int(input())
b = 0
for _ in range(n):
	w = input()
	if w == '++X' or w == 'X++':
		b += 1
	else:
		b -= 1
print(b)


def plus_minus(p, s):
	if s == '++X':
		h = p + 1
	elif s == 'X++':
		h = p + 1
	elif s == '--X':
		h = p - 1
	else:
		h = p - 1
	return h
p = 0
a = int(input())
l = []
for _ in range(a):
	s = input()
	l.append(s)
for i in l:
	p = plus_minus(p, i)
print(p)


x = 0

def main():
	global x
	n = int(input())
	for i in range(n):
		s = input()
		execute(s)
	print(x)

def execute(s):
	global x
	if s == '++X' or s == 'X++':
		x += 1
	else:
		x -= 1
main()


s = int(input())
t = [input() for w in range(s)]
n = 0
for x in range(len(t)):
	if t[x] == '++X' or t[x] == 'X++':
		n += 1
	else:
		n -= 1
print(n)


n = int(input())
x = 0
while n:
	a = list(input())
	s = a.count('+')
	if s > 0:
		x += 1
	else:
		x -= 1
	n -= 1
print(x)


print(sum((1 if input().count('+') > 1 else -1 for i in range(int(input())))))


def main():
	x = 0
	n = int(input())
	while n > 0:
		s = input()
		n -= 1
		p = s.find('+')
		if p != -1:
			x += 1
		else:
			x -= 1
	print(x)
main()


n = int(input())
a = 0
b = 0
for i in range(n):
	y = input()
	if '+' in y:
		a = a + 1
	else:
		b = b + 1
print(a - b)


n = int(input())
plus_total = 0
minus_total = 0
for i in range(n):
	m = input()
	plus = 0
	minus = 0
	for i in range(len(m)):
		if m[i] == '+':
			plus += 1
		elif m[i] == '-':
			minus += 1
	if plus == 2:
		plus_total += 1
	elif minus == 2:
		minus_total += 1
x = 0
x += plus_total
x -= minus_total
print(x)


x = 0
for _ in range(int(input())):
	r = input()
	if r == '++X':
		x += 1
	elif r == 'X++':
		x += 1
	elif r == '--X':
		x -= 1
	else:
		x -= 1
print(x)


n = int(input())
res = ''
while n > 0:
	res += input()
	res += ' '
	n -= 1
p1 = int(res.count('X++'))
p2 = int(res.count('++X'))
p = p1 + p2
m1 = int(res.count('X--'))
m2 = int(res.count('--X'))
m = m1 + m2
result = p - m
print(result)


n = int(input())
count = 0
for i in range(n):
	inp = str(input())
	inplist = list(inp)
	if inplist[0] and inplist[1] is '+':
		count += 1
	elif inplist[0] and inplist[1] is '-':
		count -= 1
	elif inplist[1] and inplist[2] is '+':
		count += 1
	else:
		count -= 1
print(count)


t = int(input())
c = 0
while t:
	t = t - 1
	s = input()
	if s.count('+'):
		c = c + 1
	else:
		c = c - 1
print(c)


n = int(input())
h = 0
for i in range(n):
	d = str(input())
	if d[1] == '+':
		h += 1
	else:
		h -= 1
print(h)


n = input()
k = [input().split() for i in range(int(n))]
count = 0
for i in k:
	if i[0][0] == '+' or i[0][-1] == '+':
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
number = 0
for i in range(n):
	lang = input()
	if lang == '++X' or lang == 'X++':
		number += 1
	else:
		number -= 1
print(number)


count = 0
for _ in range(int(input())):
	a = input()
	if '+' in a:
		count += 1
	elif '-' in a:
		count -= 1
print(count)


y = int(input())
x = 0
for a in range(0, y):
	z = input()
	if z == '++X' or z == 'X++':
		x += 1
	else:
		x -= 1
print(x)


add = 0
sub = 0
for _ in range(int(input())):
	s = input()
	if s == '++X' or s == 'X++':
		add += 1
	else:
		sub += 1
print(add - sub)


X = 0
n = int(input())
for i in range(n):
	a = input()
	for j in a:
		if j == '+':
			X += 1
			break
		elif j == '-':
			X -= 1
			break
print(X)


def evaluate(lines):
	x = 0
	for i in lines:
		if i == '++X' or i == 'X++':
			x += 1
		elif i == '--X' or i == 'X--':
			x = x - 1
	print(x)
n = int(input())
lines = []
for i in range(n):
	lines.append(input())
evaluate(lines)


num = int(input())
result = 0
for i in range(num):
	code = input()
	if code.find('++') == -1:
		result -= 1
	else:
		result += 1
print(result)


x = 0
operations = int(input())
for i in range(operations):
	operation = input()
	if operation[1] == '+':
		x = x + 1
	if operation[1] == '-':
		x = x - 1
print(x)


n = int(input())
x = 0
for i in range(n):
	command = input().split('X')
	if '++' in command:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
total = 0
for i in range(n):
	s = list(input())
	if s[0] == 'X':
		if s[2] == '+':
			total += 1
		elif s[2] == '-':
			total -= 1
	elif s[2] == 'X':
		if s[0] == '+':
			total += 1
		elif s[0] == '-':
			total -= 1
	t = ''
print(str(total))


n = input()
n = int(n)
res = 0
while n > 0:
	z = input()
	if '+' in z:
		res += 1
	elif '-' in z:
		res -= 1
	n -= 1
print(res)


t = int(input())
x = 0
for _ in range(t):
	a = input()
	if a == '++X' or a == 'X++':
		x += 1
	if a == '--X' or a == 'X--':
		x -= 1
print(x)


n = int(input())
output = 0
for i in range(n):
	line = str(input())
	for char in line:
		if char == '+':
			output += 1
			break
		if char == '-':
			output -= 1
			break
print(output)


n = int(input())
x = 0
for i in range(n):
	l = str(input())
	if l[1:3] == '++' or l[0:2] == '++':
		x += 1
	if l[1:3] == '--' or l[0:2] == '--':
		x -= 1
print(x)


time = int(input())
x = 0
for i in range(time):
	func = input()
	if '+' in func:
		x += 1
	elif '-' in func:
		x -= 1
print(x)


numberofstatements = int(input())
x = 0
for i in range(numberofstatements):
	operation = input().rstrip()
	if '+' in operation:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for i in range(n):
	op = input()
	x += int('++' in op) - int('--' in op)
print(x)


n = int(input())
x = 0
while n:
	l = list(map(str, input().split()))
	if l[0][1] == '+':
		x = x + 1
	else:
		x = x - 1
	n = n - 1
print(x)


t = int(input())
x = 0
while t:
	t -= 1
	s = input()
	if '++' in s:
		x += 1
	elif '--' in s:
		x -= 1
print(x)


m = int(input())
count = 0
sign = ['+']
for i in range(0, m):
	s = input()
	if sign[0] in s:
		count = count + 1
	else:
		count = count - 1
print(count)


statements = int(input())
value = 0
for index in range(statements):
	statement = input()
	if '++' in statement:
		value += 1
	elif '--' in statement:
		value -= 1
print(value)


val = 0
n = int(input())
while n > 0:
	n -= 1
	a = input()
	if a == '++X' or a == 'X++':
		val += 1
	else:
		val -= 1
print(val)


n = int(input())
x = 0
plus = ['++X', '+X+', 'X++']
down = ['--X', 'X--', '-X-']
for i in range(n):
	order = input()
	if order in plus:
		x += 1
	elif order in down:
		x -= 1
print(x)


li = []

def bit(n):
	x = 0
	for i in range(n):
		statement = input()
		li.append(statement)
	for i in range(n):
		if li[i] == '++X' or li[i] == '++x' or li[i] == 'X++' or (li[i] == 'x++'):
			x += 1
		elif li[i] == '--X' or li[i] == '--x' or li[i] == 'X--' or (li[i] == 'x--'):
			x -= 1
	print(x)
n = int(input())
bit(n)


N = int(input())
ans = 0
for i in range(N):
	a = input()
	a = list(a)
	if '+' in a:
		ans += 1
	elif '-' in a:
		ans -= 1
print(ans)


n = int(input())
value = 0
while n > 0:
	st = list(input())
	if '+' in st:
		value += 1
	elif '-' in st:
		value -= 1
	n = n - 1
print(value)


statementCount = int(input())
x = 0
for i in range(statementCount):
	statement = input()
	if statement.startswith('++') or statement.endswith('++'):
		x += 1
	elif statement.startswith('--') or statement.endswith('--'):
		x -= 1
print(x)


from array import array
from sys import stdin
import bisect

def scan_gen():
	for line in stdin:
		yield from iter(line.split())
scan = scan_gen()

def nint():
	return int(next(scan))

def nintk(k):
	return tuple((nint() for _ in range(k)))

def nfloat():
	return float(next(scan))

def intar_init(size):
	return array('i', [0]) * size

def intar(size=None):
	arr = intar_init(size if size != None else nint())
	for x in range(size):
		arr[x] = nint()
	return arr

def solve():
	n = int(input())
	A = [1 if '+' in input() else -1 for _ in range(n)]
	print(sum(A))
solve()


n = int(input())
x = 0
while n:
	s = input()
	x += s[1] == '+' or -1
	n -= 1
print(x)


n = int(input())
x = 0
while True:
	statment = input()
	n -= 1
	if statment[0:2] == '++':
		x += 1
	elif statment[0:2] == '--':
		x -= 1
	elif statment[len(statment) - 2:] == '++':
		x += 1
	elif statment[len(statment) - 2:] == '--':
		x -= 1
	if n <= 0:
		break
print(x)


s = ''
for x in [0] * int(input()):
	s += input()
print((s.count('+') - s.count('-')) // 2)


t = int(input())
x = 0
while t:
	t -= 1
	st = input()
	if '+' in st:
		x += 1
	elif '-' in st:
		x -= 1
	else:
		continue
print(x)


k = 0
a = []
n = int(input())
for i in range(n):
	a.append(list(input()))
for i in range(n):
	if a[i][0] == '+' and a[i][1] == '+' or (a[i][1] == '+' and a[i][2] == '+'):
		k += 1
	elif a[i][0] == '-' and a[i][1] == '-' or (a[i][1] == '-' and a[i][2] == '-'):
		k -= 1
print(k)


total_ops = input()
x = 0
for k in range(int(total_ops)):
	op = input()
	if op.find('+') != -1:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
X = 0
add1 = '++X'
add2 = 'X++'
minus1 = '--X'
minus2 = 'X--'
count = 0
for i in range(0, n):
	statement = input()
	if statement == add1 or statement == add2:
		count = count + 1
	elif statement == minus1 or statement == minus2:
		count = count - 1
print(count)


values = int(input(''))
data = []
for i in range(values):
	data.append(input(''))
value = 0
for row in data:
	if '+' == row[1]:
		value += 1
	if '-' == row[1]:
		value -= 1
print(value)


n = int(input())
x = 0
while n != 0:
	ss = input()
	aa = list(ss)
	if aa[1] == '+':
		x += 1
	else:
		x -= 1
	n -= 1
print(x)


N = int(input(''))
Res = 0
for K in range(N):
	BIT = input('')
	B = str(BIT[0])
	T = str(BIT[2])
	if B == 'X':
		if T == '-':
			Res = Res - 1
		else:
			Res = Res + 1
	elif B == '-':
		Res = Res - 1
	else:
		Res = Res + 1
print(Res)


n = int(input())
x = 0
list1 = []
for i in range(n):
	str_stat = str(input())
	if str_stat == '++X' or str_stat == 'X++':
		x += 1
	elif str_stat == '--X' or str_stat == 'X--':
		x -= 1
	else:
		pass
print(x)


n = int(input())
x = 0
for _ in range(n):
	s = str(input())
	if s == '++X':
		x += 1
	elif s == 'X++':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
r = 0
for k in range(0, n):
	s = input()
	if s.count('+') == 2:
		r += 1
	else:
		r -= 1
print(r)


a = int(input())
x = 0
for i in range(a):
	xs = input()
	if xs == '++X':
		x += 1
	elif xs == 'X++':
		x += 1
	elif xs == '--X':
		x -= 1
	elif xs == 'X--':
		x -= 1
print(x)


n = int(input())
p = 0
while n > 0:
	s = input()
	if '++' in s:
		p += 1
	elif '--' in s:
		p -= 1
	n -= 1
print(p)


n = int(input())
li = []
for i in range(n):
	li.append(input())
x = 0
for k in range(len(li)):
	if '+' in li[k]:
		x += 1
	elif '-' in li[k]:
		x -= 1
print(x)


size = int(input())
cnt = 0
for i in range(size):
	s = str(input())
	if s[0] == '+' or s[-1] == '+':
		cnt += 1
	else:
		cnt -= 1
print(cnt)


t = int(input())
x = 0
counteradd = 0
countersub = 0
for i in range(t):
	i = str(input())
	if i == 'X++' or i == '++X':
		counteradd = counteradd + 1
	elif i == 'X--' or i == '--X':
		countersub = countersub + 1
x = 0
x = x + counteradd - countersub
print(x)


from math import sqrt

def main():
	d = int(input())
	vals = [input() for v in range(d)]
	print(sum([1 if '++' in c else -1 for c in vals]))
main()


n = int(input())
answer = 0
for i in range(n):
	statement = input()
	if '+' in statement:
		answer += 1
	elif '-' in statement:
		answer -= 1
print(int(answer))


A = int(input())
x = 0
c = 0
d = 0
for x in range(A):
	B = input()
	if B == 'X++' or B == '++X':
		c = c + 1
	elif B == 'X--' or B == '--X':
		d -= 1
x = c + d
print(x)


def main():
	result = 0
	lim = int(input())
	for x in range(lim):
		if input().count('+') > 0:
			result += 1
		else:
			result -= 1
	print(result)
main()


nub = int(input())
mm = []
for i in range(nub):
	ab = input()
	mm.append(ab)
list1 = []
for i in mm:
	if i == 'X++' or i == '++X':
		i = +1
		list1.append(i)
	elif i == 'X--' or i == '--X':
		i = -1
		list1.append(i)
	num = sum(list1)
print(num)


s = 0
a = 0
for _ in range(int(input())):
	st = set(input())
	for i in st:
		if i == '+':
			a = a + 1
		if i == '-':
			s = s - 1
print(s + a)


n = int(input())
i = 0
x = 0
while i < n:
	statement = input()
	plusCount = statement.count('+') // 2
	minusCount = statement.count('-') // 2
	x += plusCount
	x -= minusCount
	i += 1
print(x)


import sys
sys.stdin.readline()
x = 0
for line in sys.stdin:
	if line[0] == '+' or line[2] == '+':
		x += 1
	else:
		x -= 1
print(x)


size = int(input())
lines = []
for i in range(size):
	lines.append(input())
x = 0
for line in lines:
	if '++' in line:
		x += 1
	if '--' in line:
		x -= 1
print(x)


n = int(input())
answer = 0
for i in range(n):
	line = input()
	if '++' in line:
		answer += 1
	if '--' in line:
		answer -= 1
print(answer)


a = int(input(''))
x = 0
list = []
while a > 0 and 1 <= a <= 150:
	b = input('')
	list.append(b)
	a = a - 1
for i in list:
	if i[1] == '+':
		x = x + 1
	elif i[1] == '-':
		x = x - 1
print(x)


n = int(input())
x = 0
for _ in range(n):
	operation = str(input())
	if operation == '++X' or operation == 'X++':
		x = x + 1
	if operation == '--X' or operation == 'X--':
		x = x - 1
print(x)


n = int(input())
r = 0
for i in range(n):
	s = input()
	f = s.find('+')
	if f != -1:
		r = r + 1
	else:
		r = r - 1
print(r)


import sys
m = int(input())
ans = 0
for i in range(0, m):
	s = input()
	if s[1] == '+':
		ans += 1
	else:
		ans += -1
print(ans)


x = 0
n = int(input())
lst = []
for i in range(0, n):
	temp = str(input())
	lst.append(temp)
for i in lst:
	if i == '++X' or i == 'X++':
		x = x + 1
	else:
		x = x - 1
print(x)


import sys

def solve(input_stream, output_stream):
	x = 0
	for statement in input_stream.readlines()[1:]:
		x += 1 if '+' in statement else -1
	output_stream.write(str(x))
solve(sys.stdin, sys.stdout)


c = 0
for _ in range(int(input())):
	c += [-1, 1][input() in ['++X', 'X++']]
print(c)


x = 0
for _ in range(int(input().strip())):
	statement = input()
	if statement[0] == '+' or statement[-1] == '+':
		x = x + 1
	elif statement[0] == '-' or statement[-1] == '-':
		x = x - 1
print(x)


x = int(input())
i = 0
z = 0
for i in range(x):
	y = input()
	yy = y.lower()
	if yy == 'x++' or yy == '++x':
		z += 1
	elif yy == 'x--' or yy == '--x':
		z -= 1
print(z)


n = int(input())
x = 0
whitelist = ['X', 'X++', '++X', 'X--', '--X']
for _ in range(n):
	action = input()
	if action in whitelist:
		if action == whitelist[1] or action == whitelist[2]:
			x += 1
		elif action == whitelist[3] or action == whitelist[4]:
			x -= 1
print(x)


n = int(input())
x = 0
for i in range(n):
	a = str(input())
	if a.find('++') > -1:
		x += 1
	elif a.find('--') > -1:
		x -= 1
print(x)


x = int(input())
z = 0
for i in range(x):
	y = input()
	if y == 'X++':
		z += 1
	elif y == 'X--':
		z -= 1
	elif y == '++X':
		z += 1
	elif y == '--X':
		z -= 1
print(z)


x = int(input())
n = 0
k = 0
while n < x:
	l = input()
	if ord(l[0]) == 43 or ord(l[1]) == 43:
		k = k + 1
	else:
		k = k - 1
	n = n + 1
print(k)


n = int(input())
x = 0
pl = 0
mi = 0
for i in range(n):
	p = input()
	for w in p:
		if w == '+':
			pl = pl + 1
		if w == '-':
			mi = mi + 1
pl = pl / 2
mi = mi / 2
print(int(x + pl - mi))


iterations = int(input())
plus_count = 0
minus_count = 0
for _ in range(iterations):
	bit_list = list(map(str, input()))
	plus = bit_list.count('+')
	minus = bit_list.count('-')
	plus_count = plus_count + plus // 2
	minus_count = minus_count - minus // 2
if plus_count > minus_count:
	count = plus_count + minus_count
elif minus_count > plus_count:
	count = minus_count + plus_count
print(count)


n = int(input())
acc = 0
for _ in range(n):
	instr = input()
	if instr[1] == '+':
		acc += 1
	else:
		acc -= 1
print(acc)


num = int(input())
x = 0
for i in range(num):
	Op = input()
	for y in range(2):
		if Op[y] == '+' and Op[y + 1] == '+':
			x += 1
		elif Op[y] == '-' and Op[y + 1] == '-':
			x -= 1
print(x)


n = int(input())
x = 0
for i in range(n):
	s = input()
	z = s.split()
	if s[1] == '+':
		x += 1
	else:
		x -= 1
	i += 1
print(x)


n = int(input())
answer = 0
for i in range(n):
	operation = input()
	if operation.startswith('++') or operation.endswith('++'):
		answer += 1
	else:
		answer -= 1
print(answer)


N = int(input())
ans = 0
for x in range(N):
	Op = input()
	if '+' in Op:
		ans += 1
	else:
		ans -= 1
print(ans)


statementCount = int(input())
list1 = []
for index in range(statementCount):
	list1.append(str(input()))
count = 0
for string in list1:
	if '+' in string:
		count += 1
	else:
		count -= 1
print(count)


a = int(input())
L = []
x = 0
for i in range(a):
	L.append(input())
b = L.count('++X') + L.count('X++')
c = L.count('--X') + L.count('X--')
print(x + (b - c))


n = int(input())
lis = []
res = 0
for i in range(0, n):
	what = input()
	lis.append(what)
for j in range(0, len(lis)):
	if lis[j] == '++X' or lis[j] == 'X++':
		res = res + 1
	else:
		res = res - 1
print(res)


def main():
	x = 0
	n = int(input())
	for i in range(0, n):
		st = input()
		if st.upper() in ['X++', '++X']:
			x += 1
		elif st.upper() in ['X--', '--X']:
			x -= 1
	print(x)
main()


n = int(input())
list0 = [0] * n
x = 0
for i in range(n):
	list0[i] = input()
	if '+' in list(str(list0[i])):
		x += 1
	if '-' in list(str(list0[i])):
		x -= 1
print(x)


x = int(input())
v = 0
for num in range(x):
	s = input()
	if '+' in s:
		v += 1
	if '-' in s:
		v -= 1
print(v)


n = eval(input())
add = 0
minus = 0
for i in range(n):
	s = input()
	add += s.count('+')
	minus += s.count('-')
print(int((add - minus) / 2))


class Solution(object):

	def __init__(self):
		n = int(input())
		x = 0
		for _ in range(n):
			data = input()
			if data.count('+'):
				x += 1
			else:
				x -= 1
		print(x)
	pass

def main():
	Solution()
	pass
main()


x = 0
for __ in range(int(input())):
	s = input()
	if s == 'X++' or s == '++X':
		x += 1
	else:
		x -= 1
print(x)


def execute(l):
	result = 0
	for command in l:
		if '+' in command:
			result += 1
		else:
			result -= 1
	return result

def main():
	first_line = input()
	first_line = first_line.split()
	n = int(first_line[0])
	l = []
	for i in range(n):
		line = input()
		l.append(line)
	print(execute(l))
main()


n = int(input())
x = 0
for k in range(n):
	t = input()
	if '+' in list(t):
		x += 1
	else:
		x -= 1
print(x)


b = c = 0
m = int(input())
for i in range(m):
	a = input()
	b += a.count('++')
	c += a.count('--')
print(b - c)


x = 0
exec('x+=1 if "++"in input() else -1;' * int(input()))
print(x)


n = int(input())
z = []
for i in range(0, n):
	x = input()
	z.append(x)
plus = z.count('X++') + z.count('++X')
minus = z.count('--X') + z.count('X--')
if plus > minus:
	print(0 + (plus - minus))
if plus < minus:
	print(0 + (plus - minus))
if plus == minus:
	print(0)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def instring():
	return str(input())

def bitplus(value):
	x = 0
	for v in value:
		if v == 'X++' or v == '++X':
			x += 1
		else:
			x -= 1
	return x
s = inp()
op = []
for j in range(s):
	op.append(str(instring().rstrip()))
o = bitplus(op)
print(o)


n = int(input())
sum = 0
for i in range(n):
	y = str(input())
	if y == '++X' or y == 'X++':
		sum = sum + 1
	elif y == '--X' or y == 'X--':
		sum = sum - 1
print(sum)


a = 0
for x in range(int(input())):
	b = input()
	if b.find('+') != -1:
		a += 1
	else:
		a -= 1
print(a)


count = int(input())
minus = 0
plus = 0
while count > 0:
	oper = input()
	if '-' in oper:
		minus = minus + 1
	else:
		plus = plus + 1
	count = count - 1
print(str(plus - minus))


n = input()
arr = []
ctr = 0
for i in range(0, int(n)):
	a = input()
	arr.append(a)
for i in arr:
	if i.lower() == '++x' or i.lower() == 'x++':
		ctr += 1
	else:
		ctr -= 1
print(ctr)


n = int(input())
x_value = 0
for _ in range(n):
	line = input()
	if '--' in line:
		x_value -= 1
	elif '++' in line:
		x_value += 1
print(x_value)


n = int(input())
cont = 0
opr = []
for x in range(n):
	opr.append(input())
for x in opr:
	if x[1] == '+':
		cont += 1
	if x[1] == '-':
		cont -= 1
print(cont)


a1 = ['X++', '++X']
a2 = ['--X', 'X--']
x = 0
for i in range(int(input())):
	if input() in a1:
		x = x + 1
	else:
		x = x - 1
print(x)


import sys
data = sys.stdin.readlines()[1:]
count = 0
for i in data:
	if '+' in i:
		count = count + 1
	else:
		count = count - 1
print(count)


inp = int(input())
X = 0
for i in range(inp):
	x_input = input()
	if '+' in x_input:
		X += 1
	if '-' in x_input:
		X -= 1
print(X)


mylist = []
mysum = 0
iterations = int(input())
userinput = None
for a in range(0, iterations):
	userinput = input()
	mylist.append(userinput)
for x in mylist:
	if '++' in x:
		mysum += 1
	elif '--' in x:
		mysum -= 1
	else:
		print("That's invalid")
print(mysum)


x = 0
for _ in range(int(input())):
	huli = input()
	x = x + ('+' in huli) - ('-' in huli)
print(x)


def bit_pp(s):
	bit_mapper = {'X++': 1, '++X': 1, 'X--': -1, '--X': -1}
	X = 0
	for statement in s:
		X += bit_mapper[statement]
	return X
import sys
line = []
for l in sys.stdin:
	line.append(l.rstrip('\n'))
n = line[0]
print(bit_pp(line[1:]))


n = input()
x = 0
for i in range(int(n)):
	line = input().lower()
	if line == '++x' or line == 'x++':
		x += 1
	elif line == '--x' or line == 'x--':
		x -= 1
print(x)


a = int(input())
x = 0
f = []
for i in range(a):
	f += input().split('X')
for i in range(len(f)):
	if f[i] == '++':
		x += 1
	elif f[i] == '--':
		x -= 1
print(x)


lines = int(input())
i = 0
j = 0
while i < lines:
	symbol = input()
	if symbol == '++X' or symbol == 'X++':
		j += 1
	else:
		j -= 1
	i += 1
print(j)


t = int(input())
value = 0
for i in range(t):
	te = value
	x = input()
	if x == 'X++':
		value += 1
	elif x == 'X--':
		value -= 1
	elif x == '--X':
		value -= 1
	elif x == '++X':
		value += 1
print(value)


noOfStmnts_ = input()
noOfStmnts = int(noOfStmnts_)
q = []
while noOfStmnts > 0:
	q.append(input())
	noOfStmnts -= 1
x = 0
for i in q:
	if i == '++X' or i == 'X++':
		x += 1
	else:
		x -= 1
print(x)


n = input()
li = list()
x = 0
for i in range(int(n)):
	li.append(input())
for i in range(int(n)):
	if li[i][0] == 'X':
		if li[i][1] == '+':
			x = x + 1
		elif li[i][1] == '-':
			x = x - 1
	elif li[i][2] == 'X':
		if li[i][1] == '+':
			x = x + 1
		elif li[i][1] == '-':
			x = x - 1
print(int(x))


num = int(input())
count = 0
for i in range(0, num):
	s = input()
	if str.__contains__(s, '+'):
		count += 1
	else:
		count -= 1
print(count)


x = 0
for _ in range(int(input())):
	s = input()
	x += (-1, 1)['+' in s]
print(x)


ans = 0
for m in range(int(input())):
	s = input()
	if '++' in s:
		ans += 1
	else:
		ans -= 1
print(ans)


x = 0
for k in range(int(input())):
	a = list(input())
	if '+' in a:
		x += 1
	elif '-' in a:
		x -= 1
print(x)


n = int(input())
arr = []
x = 0
for i in range(0, n):
	a = input()
	arr.append(a)
	if arr[i].find('++') != -1:
		x += 1
	elif arr[i].find('--') != -1:
		x -= 1
	else:
		x = x
print(x)


from sys import stdin
n = int(stdin.readline())
x = 0
for i in range(n):
	s = stdin.readline()
	if s[1] == '-':
		x -= 1
	else:
		x += 1
print(x)


from sys import stdin, stdout
result = 0
statements = int(stdin.readline())
i = 1
while i <= statements:
	s = stdin.readline()
	if '++' in s:
		result = result + 1
	if '--' in s:
		result = result - 1
	i = i + 1
print(result)


ans = 0
for _ in range(int(input())):
	aux = input().lower()
	if aux == '++x' or aux == 'x++':
		ans += 1
	else:
		ans -= 1
print(ans)


l = int(input())
initial = 0
for x in range(l):
	s = input()
	if '+' in s:
		initial += 1
	else:
		initial -= 1
print(initial)


n = int(input())
x = 0
while n > 0:
	n -= 1
	line = input()
	for c in line:
		if c == 'X':
			continue
		if c == '+':
			x += 1
			break
		if c == '-':
			x -= 1
			break
print(x)


n = int(input())
bits = []
for _ in range(n):
	bits.append(input())
x = 0
for i in range(n):
	if '+' in bits[i]:
		x = x + 1
	else:
		x = x - 1
print(x)


q = int(input())
x = 0
l = []
for i in range(q):
	h = input()
	l.append(h)
for i in l:
	if i == 'X++' or i == '++X':
		x += 1
	elif i == '--X' or i == 'X--':
		x -= 1
print(x)


num = int(input())
ans = 0
for f in range(num):
	x = input()
	if x == '++X' or x == 'X++':
		ans += 1
	else:
		ans -= 1
print(ans)


def list_input():
	return list(map(int, input().split()))

def multiple_input():
	return map(int, input().split())

def op(s):
	if s == '++X' or s == 'X++':
		return 1
	else:
		return -1
ans = 0
for _ in range(int(input())):
	string = input()
	ans += op(string)
print(ans)


n = int(input())
c = 0
while n:
	s = input()
	if '++' in s:
		c += 1
	elif '--' in s:
		c -= 1
	n -= 1
print(c)


(n, ans) = (int(input()), 0)
for i in range(n):
	a = str(input())
	if a[0] == '+' or a[1] == '+':
		ans += 1
	else:
		ans += -1
print(ans)


operations = int(input())
x = 0
for i in range(operations):
	inputOp = input().split('X')
	operation = inputOp[0] if inputOp[0] == '++' or inputOp[0] == '--' else inputOp[1]
	if operation == '++':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
charr = []
x = 0
for i in range(n):
	charr.append(input())
for st in charr:
	if '+' in st:
		x += 1
	elif '-' in st:
		x -= 1
print(x)


l = [input().count('+') - 1 for i in range(int(input()))]
print(sum(l))


n = int(input())
y = 0
for i in range(n):
	p = str(input())
	if '++' in p:
		y = y + 1
	elif '--' in p:
		y = y - 1
print(y)


n = int(input())
X = 0
for i in range(n):
	line = input()
	a = int(line.count('+') / 2)
	if a > 0:
		X += 1
	else:
		X -= 1
print(X)


n = int(input())
count = 0
for i in range(n):
	m = str(input())
	l = list(m)
	if '+' in l:
		count = count + 1
	else:
		count = count - 1
print(count)


n = int(input())
s = 0
for i in range(n):
	opr = str(input())
	s = s + opr.count('++') - opr.count('--')
print(s)


n = int(input())
operations = []
for i in range(0, n):
	line = input().split(' ')
	operation = str(line[0])
	operations.append(operation)
x = 0
for i in range(len(operations)):
	if '--' in operations[i]:
		x -= 1
	else:
		x += 1
print(x)


x = 0
n = int(input())
for _ in range(n):
	st = list(input())
	st.remove('X')
	if st.count('+') == 2:
		x += 1
	elif st.count('-') == 2:
		x -= 1
print(x)


n = int(input())
i = 0
final = 0
while i < n:
	string = str(input())
	pluscnt = 0
	mincnt = 0
	xcnt = 0
	for item in string:
		if item == '+':
			pluscnt += 1
		if item == '-':
			mincnt += 1
		if item == 'X':
			xcnt += 1
	if pluscnt == 2:
		final += 1
	if mincnt == 2:
		final -= 1
	i += 1
print(final)


a = int(input(''))
inputs = []
ans = 0
for value in range(a):
	inputs.append(input(''))
for val in inputs:
	if '++' in val:
		ans = ans + 1
	else:
		ans = ans - 1
print(ans)


n = int(input())
sum = 0
for i in range(n):
	raw = input()
	for j in raw:
		if j == '+':
			sum += 1
			break
		elif j == '-':
			sum -= 1
			break
print(sum)


x = 0
for i in range(int(input())):
	a = input()
	for k in a:
		if k in '+':
			x += 1
		if k in '-':
			x -= 1
print(int(x / 2))


Number = int(input())
Answer = 0
for i in range(Number):
	a = input()
	if a[0] == '+' or a[1] == '+' or a[2] == '+':
		Answer += 1
	if a[0] == '-' or a[1] == '-' or a[2] == '-':
		Answer -= 1
print(Answer)


n = int(input())
x = 0
for i in range(n):
	sign = list(input())
	if sign[0] == '+' or sign[2] == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


b = input()
n = int(b)
x = 0
for a in range(0, n):
	q = input()
	count = q.count('++')
	if count > 0:
		x += count
	count = q.count('--')
	if count > 0:
		x -= count
print(x)


num_statements = int(input())
solution = 0
for _ in range(num_statements):
	statement = input()
	if statement.find('+') == -1:
		solution -= 1
	else:
		solution += 1
print(solution)


n = int(input())
k = 0
for x in range(n):
	i = list(input()[:3])
	if i[0] == '+' or i[2] == '+':
		k += 1
	else:
		k -= 1
print(k)


amount = 0
for x in range(int(input())):
	operation = input()
	if operation == '++X' or operation == 'X++':
		amount += 1
	else:
		amount -= 1
print(amount)


c = 0
for i in range(int(input())):
	s = input()
	if s[1] is '+':
		c += 1
	else:
		c -= 1
print(c)


n = int(input())
list = []
for i in range(n):
	a = input()
	for j in str(a):
		list.append(j)
x = 0.0
for i in list:
	if i == '+':
		x += 0.5
	elif i == '-':
		x -= 0.5
print(int(x))


quontity = int(input())
count = 0
plusf = 'X++'
pluss = '++X'
minusf = 'X--'
minuss = '--X'
for i in range(quontity):
	example = input('')
	if example == plusf or example == pluss:
		count = count + 1
	elif example == minusf or example == minuss:
		count = count - 1
print(count)


def main():
	n = int(input())
	rez = 0
	while n > 0:
		_ = input()
		n -= 1
		if '++' in _:
			rez += 1
		if '--' in _:
			rez -= 1
	print(rez)
main()


n = int(input())
bits = list()
for i in range(n):
	bits.append(input())
result = 0
for i in range(n):
	if '++' in bits[i]:
		result += 1
	else:
		result -= 1
print(result)


print(int(sum([((input()[1] == '+') - 0.5) * 2 for i in range(int(input()))])))


n = int(input())
list: str = []
for i in range(n):
	list.append(str(input()))
num: int = 0
for i in range(n):
	if list[i].__contains__('++'):
		num += 1
	else:
		num -= 1
print(num)


def main():
	n = int(input())
	x = 0
	for i in range(n):
		temp = input()
		if '++' in temp:
			x += 1
		elif '--' in temp:
			x -= 1
	print(x)
main()


n0 = str(input())
n = 0
for elem in n0:
	n = int(elem) + n * 10
res = 0
s = []
for k in range(0, n):
	s.append(str(input()))
	if s[k] == 'X++' or s[k] == '++X':
		res += 1
	else:
		res -= 1
print(res)


a = int(input())
i = 1
x = 0
while i <= a:
	b = input()
	if b[0] == '+' or b[1] == '+':
		x = x + 1
	if b[0] == '-' or b[1] == '-':
		x = x - 1
	i = i + 1
print(x)


counter = 0
list = []
r = int(input())
for i in range(0, r):
	code = input()
	list.append(code)
for i in range(0, r):
	if list[i] == '++X' or list[i] == 'X++':
		counter += 1
	elif list[i] == '--X' or list[i] == 'X--':
		counter -= 1
print(counter)


n = int(input())
o = 0
for i in range(1, n + 1):
	p = input()
	if p == 'X++':
		o += 1
	elif p == 'X--':
		o -= 1
	elif p == '++X':
		o += 1
	else:
		o -= 1
print(o)


x = 0
n = int(input())
while n > 0:
	n -= 1
	y = input()
	if '-' in y:
		x -= 1
	if '+' in y:
		x += 1
print(x)


y = int(input())
c = 0
for i in range(y):
	x = input()
	if x == '++X' or x == 'X++':
		c += 1
	if x == '--X' or x == 'X--':
		c -= 1
print(c)


X = 0
nbr_statements = int(input())
i = 1
while i <= nbr_statements:
	statement = input()
	if statement == '++X' or statement == 'X++':
		X += 1
	elif statement == '--X' or statement == 'X--':
		X -= 1
	else:
		exit(0)
	i += 1
print(X)


n = int(input())
x = 0
for i in range(n):
	op = input()
	if op[1] is '+':
		x += 1
	else:
		x -= 1
print(x)


t = int(input())
x = 0
while t > 0:
	a = input()
	if a[1] == '+':
		x += 1
	else:
		x -= 1
	t -= 1
print(x)


a = int(input())
x = 0
while a:
	s = input()
	if '++' in s:
		x += 1
	else:
		x -= 1
	a -= 1
print(x)


n = input()
n = int(n)
t = 0
for i in range(0, n):
	str = input()
	for j in range(0, len(str)):
		if str[j] == '+':
			t += 1
			break
		if str[j] == '-':
			t -= 1
			break
print(t)


n = eval(input())
ans = 0
for i in range(n):
	op = input()
	if op[1] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


a = int(input())
d = []
for i in range(a):
	b = input()
	if b == 'X++' or b == '++X':
		x = 1
		d.append(x)
	elif b == 'X--' or b == '--X':
		x = -1
		d.append(x)
s = sum(d)
print(s)


N = int(input())
Count = 0
for i in range(0, N):
	S = input()
	if S.count('+') > 0:
		Count += 1
	else:
		Count -= 1
print(Count)


n = int(input())
x = 0
for y in range(n):
	thing = str(input())
	if '++' in thing:
		x += 1
	elif '--' in thing:
		x += -1
print(int(x))


n = int(input())
if n >= 1 and n <= 150:
	x = 0
	while n:
		n -= 1
		temp = str(input())
		if temp == '++X' or temp == 'X++':
			x += 1
		else:
			x -= 1
	print(x)


import io
import os
import math
n = int(input())
ans = 0
for i in range(n):
	op = input()
	if op == 'X++' or op == '++X':
		ans += 1
	else:
		ans -= 1
print(ans)


a = int(input())
b = []
for i in range(0, a):
	c = input()
	b.append(c)
b = ''.join(b)
s = b.count('++')
m = b.count('--')
print(s + -1 * m)


n = int(input())
x = 0
while n > 0:
	y = input()
	if y[0] == '+' or y[1] == '+':
		x += 1
	elif y[0] == '-' or y[1] == '-':
		x -= 1
	n -= 1
print(x)


t = int(input())
h = 0
for i in range(t):
	a = input()
	if a == '--X' or a == 'X--':
		h -= 1
	else:
		h += 1
print(h)


Tcases = int(input())
count = 0
for i in range(Tcases):
	Stri = input()
	if Stri[0] == '+' or Stri[2] == '+':
		count = count + 1
	else:
		count = count - 1
print(count)


n = int(input())
x = 0
a = []
for i in range(n):
	a.append(input())
for i in a:
	if '--' in i:
		x = x - 1
	if '++' in i:
		x = x + 1
print(x)


n = int(input())
arr = []
for i in range(n):
	s = input()
	arr.append(s)
cnt = 0
for item in arr:
	if item[1] == '+':
		cnt += 1
	elif item[1] == '-':
		cnt -= 1
print(cnt)


import sys
m = int(input())
c = 0
for i in range(m):
	n = sys.stdin.readline()
	if '+' in n:
		c += 1
	else:
		c -= 1
print(c)


x = int(input())
l = []
X = 0
for i in range(x):
	s = input()
	if s == '++X':
		X = X + 1
	elif s == '--X':
		X = X - 1
	elif s == 'X++':
		X = X + 1
	else:
		X = X - 1
print(X)


ans = 0
for _ in range(int(input())):
	i = input()
	if '+' in i:
		ans += 1
	elif '-' in i:
		ans -= 1
	else:
		pass
print(ans)


n = int(input(''))
x = 0
for k in range(n):
	y = str(input())
	if y == '++X' or y == 'X++':
		x += 1
	elif y == '--X' or y == 'X--':
		x -= 1
print(x)


x = 0
lineCount = int(input())
while lineCount > 0:
	command = input()
	if '++' in command:
		x += 1
	else:
		x -= 1
	lineCount -= 1
print(x)


t = int(input())
x = 0
for _ in range(t):
	operation = input()
	if operation in ['X++', '++X']:
		x += 1
	elif operation in ['--X', 'X--']:
		x -= 1
print(x)


n = int(input())
ans = 0
for i in range(n):
	temp = input()
	for i in range(len(temp)):
		if temp[i] == '+':
			ans += 1
			break
		if temp[i] == '-':
			ans -= 1
			break
print(ans)


p = 0
u = int(input())
for i in range(u):
	value = input()
	if value[1] == '+':
		p = p + 1
	else:
		p = p - 1
print(p)


import re
n = int(input())
x = 0
for i in range(0, n):
	s = input()
	if '++' in s:
		x += 1
	elif '--' in s:
		x -= 1
print(x)


a = int(input())
sum = 0
for i in range(0, a):
	b = input()
	if b == '++X':
		sum += 1
	if b == 'X++':
		sum += 1
	if b == 'X--':
		sum -= 1
	if b == '--X':
		sum -= 1
print(sum)


t = int(input())
k = 0
for i in range(t):
	s = input()
	if '++' in s:
		k += 1
	if '--' in s:
		k -= 1
print(k)


n = int(input())
total = 0
for i in range(n):
	a = input().split('X')
	if '++' in a:
		total += 1
	elif '--' in a:
		total -= 1
print(total)


n = int(input())
t = 0
for i in range(n):
	s = str(input())
	if s.count('++') != 0:
		t += 1
	else:
		t -= 1
print(t)


n = int(input())
target = 0
for i in range(n):
	string = str(input())
	if string[0] == '+' or string[1] == '+':
		target += 1
	else:
		target -= 1
print(target)


import sys
throwaway = input()

def flatten(nested_list):
	return [item for sublist in nested_list for item in sublist]
addition = ['++X', 'X++']
subtraction = ['--X', 'X--']
a = 0
operations = [x.rstrip().split() for x in sys.stdin.readlines()]
operations = flatten(operations)
for x in operations:
	if x in addition:
		a += 1
	elif x in subtraction:
		a -= 1
	else:
		pass
print(a)


numExp = int(input())
k = 0
listExp = []
for i in range(numExp):
	exp = str(input())
	listExp.append(exp)
for i in range(len(listExp)):
	if '++' in listExp[i]:
		k += 1
	elif '--' in listExp[i]:
		k -= 1
print(k)


import math
n = int(input())
x = 0
for i in range(n):
	operation = input()
	if operation == 'X++' or operation == '++X':
		x += 1
	else:
		x -= 1
print(x)


def execute_bit(test_cases):
	X = 0
	for eachStatement in range(1, test_cases + 1):
		statement = input()
		instruction = statement.split('X')
		for each in instruction:
			if each == '++':
				X += 1
			elif each == '--':
				X -= 1
	print(X)

def main():
	test_cases = int(input())
	if test_cases >= 1 and test_cases <= 150:
		execute_bit(test_cases)
main()


def main():
	n = int(input())
	c = 0
	for i in range(n):
		a = input()
		if '+' in a:
			c += 1
		else:
			c -= 1
	print(c)
main()


n = int(input())
code_list = list()
x = 0
for i in range(0, n):
	code_list.append(input())
	if code_list[i][0] == '+':
		x += 1
	elif code_list[i][2] == '+':
		x += 1
	if code_list[i][0] == '-':
		x -= 1
	elif code_list[i][2] == '-':
		x -= 1
print(x)


n = int(input())
val = 0
for i in range(n):
	statement = input()
	if statement.find('+') == -1:
		val -= 1
	else:
		val += 1
print(val)


s = ''
for i in range(int(input())):
	s += input()
print(s.count('++') - s.count('--'))


tc = int(input())
x = 0
for hj in range(tc):
	d = input()
	if '++' in d:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
a = 0
for arg in range(n):
	s = input()
	if bool(s.count('++')):
		a += 1
	else:
		a -= 1
print(a)


import os
import sys
from atexit import register
from io import BytesIO
input = lambda : sys.stdin.readline().rstrip('\r\n')

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
counter = 0
for _ in range(inp()):
	string = input()
	counter += 1 if string[0] == '+' or string[-1] == '+' else -1
print(counter)


n = input()
n = int(n)
values = []
for _ in range(n):
	values.append(input())
counter = 0
for w in values:
	c = w[1]
	if c == '+':
		counter += 1
	else:
		counter -= 1
print(counter)


n = int(input())
x = 0
while n:
	r = input()
	if r.find('++') != -1:
		x += 1
	else:
		x -= 1
	n -= 1
print(x)


n = int(input())
ans = 0
l = []
for i in range(n):
	a = str(input())
	for x in a:
		if x == '+':
			l.append('+')
		elif x == '-':
			l.append('-')
		else:
			continue
for x in l:
	if x == '+':
		ans += 1
	else:
		ans -= 1
print(ans // 2)


num = int(input())
commands = [input() for i in range(num)]
x = 0
for command in commands:
	if '-' in command:
		x -= 1
	else:
		x += 1
print(x)


from sys import stdin
N = int(stdin.readline())
res = 0
for oper in range(N):
	op = stdin.readline()[1]
	if op == '-':
		res -= 1
	else:
		res += 1
print(res)


tot = int(input())
statement = ''
for _ in range(tot):
	str1 = str(input())
	statement += str1
print(statement.count('++') - statement.count('--'))


num = int(input())
x = 0
for counter in range(num):
	operation = input()
	if operation == 'X++' or operation == '++X':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
i = 0
final = 0
while i < n:
	decision = input()
	j = 0
	while j < 3:
		if decision[j] == '+':
			final += 1
			j = 3
			continue
		if decision[j] == '-':
			final -= 1
			j = 3
		j += 1
	i += 1
print(final)


n = int(input())
a = 0
b = 0
for i in range(n):
	i = input().lower()
	if '++' in i:
		a += 1
	else:
		b -= 1
x = a + b
print(x)


i = 0
for t in range(int(input())):
	n = str(input())
	if n == 'X++':
		i += 1
	elif n == '++X':
		i += 1
	else:
		i -= 1
print(i)


testCases = int(input())
x = 0
for _ in range(testCases):
	statement = str(input())
	if statement[:2] == '++' or statement[1:] == '++':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
inputs = []
for i in range(n):
	s = input()
	inputs.append(s)
X = 0
for i in range(n):
	if inputs[i] == 'X++' or inputs[i] == '++X':
		X += 1
	else:
		X -= 1
print(X)


s = int(input())
print(s - 2 * sum(('-' in input() for _ in [0] * s)))


n = int(input())
sequences = [input() for i in range(n)]
x = 0
for sequence in sequences:
	for i in range(3):
		if sequence[i] == '+':
			x += 1
		elif sequence[i] == '-':
			x -= 1
		else:
			pass
print(int(x / 2))


n = int(input())
ans = 0
for i in range(n):
	s = input()
	if s[0:2] == '++' or s[-1:-3:-1] == '++':
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
minus = 0
plus = 0
for i in range(n):
	st = input()
	if '-' in st:
		minus += 1
	else:
		plus += 1
print(plus - minus)


n = int(input())
x = 0
for i in range(n):
	line = input().strip()
	if ('++' in line) == True:
		x += 1
	if ('--' in line) == True:
		x -= 1
print(x)


t = int(input())
k = 0
while t:
	n = input()
	if n[1] == '+':
		k += 1
	else:
		k -= 1
	t -= 1
print(k)


n = int(input().rstrip())
x = 0
for i in range(n):
	line = input()
	if line.find('+') != -1:
		x += 1
	else:
		x -= 1
print(x)


x = 0
y = int(input())
for i in range(y):
	increment = input()
	if increment[0] == '+' or increment[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


a = ''
for i in range(0, int(input())):
	a += input()
print(a.count('++') - a.count('--'))


def main():
	from sys import stdin, stdout
	x = 0
	for _ in range(int(stdin.readline())):
		s = stdin.readline().strip()
		if '++' in s:
			x += 1
		elif '--' in s:
			x -= 1
	stdout.write(str(x))
main()


__author__ = 'alevin'
Op = int(input())
x = 0
for i in range(Op):
	de = input()
	if de == 'X++' or de == '++X':
		x += 1
	else:
		x -= 1
print(x)


import sys
x = 0
for i in range(int(input())):
	s = input()
	plus = '++'
	minus = '--'
	if s.count(plus) > 0:
		x += 1
	elif s.count(minus) > 0:
		x -= 1
	else:
		x += 0
print(x)


n = int(input())
i = 0
x = 0
while i < n:
	line = str(input())
	if line == '++X' or line == 'X++':
		x = x + 1
	elif line == '--X' or line == 'X--':
		x = x - 1
	i = i + 1
print(x)


n = int(input())
l = []
for i in range(n):
	s = input()
	l.append(s.upper())
num = 0
for i in l:
	if i == '++X' or i == 'X++':
		num += 1
	elif i == 'X--' or i == '--X':
		num -= 1
print(num)


n = int(input())
x = 0
for j in range(n):
	s = input()
	c = s[1]
	if c == '+':
		x += 1
	elif c == '-':
		x -= 1
print(x)


n = int(input())
count = 0
c = []
for i in range(n):
	k = input()
	c.append(k)
for i in c:
	if i[1] == '+':
		count += 1
	elif i[1] == '-':
		count -= 1
print(count)


a = int(input())
x = 0
for i in range(a):
	operation = input()
	if operation == 'X++':
		x += 1
	if operation == '++X':
		x += 1
	if operation == 'X--':
		x -= 1
	if operation == '--X':
		x -= 1
print(x)


x = 0
for i in range(int(input())):
	x1 = input()
	if x1[0] == '-' or x1[2] == '-':
		x -= 1
	else:
		x += 1
print(x)


import sys
T = int(input())
x = 0
for i in range(T):
	s = input()
	if '++' in s:
		x = x + 1
	else:
		x = x - 1
print(x)


import sys
data = sys.stdin.readlines()
n = int(data[0])
statements = data[1:]
x = 0
for statement in statements:
	if '++' in statement:
		x += 1
	elif '--' in statement:
		x -= 1
print(x)


while True:
	n = int(input(''))
	if n >= 1 and n <= 150:
		break
x = 0
count = 0
while count < n:
	statement = input('').upper()
	if statement == '++X' or statement == 'X++':
		x += 1
		count += 1
	elif statement == '--X' or statement == 'X--':
		x -= 1
		count += 1
print(x)


from math import *
print(sum((input().count('++') or -1 for i in range(int(input())))))


a = 0
for m in range(int(input())):
	msk = input()
	if '++' in msk:
		a += 1
	else:
		a -= 1
print(a)


val = 0
n = int(input())
for i in range(n):
	operator = input()
	if operator == '++X' or operator == 'X++':
		val += 1
	else:
		val -= 1
print(val)


no = int(input())
x = 0
for i in range(0, no):
	v = input()
	if v == 'X++' or v == '++X':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
counter = 0
for i in range(n):
	a = input()
	if a.count('+') > 0:
		counter += 1
	else:
		counter -= 1
print(counter)


l = []
n = int(input())
t = 0
for i in range(n):
	d = list(input())
	if '+' in d:
		t = t + 1
	elif '-' in d:
		t = t - 1
print(t)


import sys

def main():
	(n,) = stdin_get_ints_from_line()
	x = 0
	for _ in range(n):
		a = stdin_get_string_from_line()
		if a[1] == '+':
			x += 1
		else:
			x -= 1
	print(x)
	return

def stdin_get_ints_from_line():
	return (int(x) for x in sys.stdin.readline().strip().split(' '))

def stdin_get_ints_list_from_line():
	return list((int(x) for x in sys.stdin.readline().strip().split(' ')))

def stdin_get_string_from_line():
	return sys.stdin.readline().strip()
main()


n = int(input())
a = '++X'
b = 'X++'
c = 'X--'
d = '--X'
X = 0
er = []
et = []
t = X + 1
y = X - 1
for i in range(1, n + 1):
	r = str(input())
	er.append(r)
for j in er:
	if j == a or j == b:
		et.append(t)
	elif j == c or j == d:
		et.append(y)
	else:
		None
print(sum(et))


n = int(input())
(a, b) = (0, 0)
for i in range(n):
	s = input()
	for j in s:
		if j == '+':
			a = a + 1
		if j == '-':
			b = b + 1
print(a // 2 - b // 2)


n = int(input())
value = 0
pre_inc = '++X'
post_inc = 'X++'
pre_dec = '--X'
post_dec = 'X--'
for i in range(n):
	c = input()
	if c == pre_inc or c == post_inc:
		value += 1
	elif c == pre_dec or c == post_dec:
		value -= 1
print(value)


def main():
	test_cases = int(input())
	answer = 0
	while test_cases > 0:
		operation = input()
		if operation.startswith('++') or operation.endswith('++'):
			answer += 1
		else:
			answer -= 1
		test_cases -= 1
	print(answer)
main()


num = int(input())
a = 0
x = int(a)
for i in range(num):
	statement = input()
	if statement == 'X++' or statement == '++X':
		x = x + 1
	elif statement == 'X--' or statement == '--X':
		x = x - 1
print(x)


import sys
n = int(input())
c = 0
for i in range(n):
	a = input()
	k = a.find('+')
	if k == -1:
		c -= 1
	else:
		c += 1
print(c)


n = int(input())
x = 0
for i in range(0, n):
	s = input()
	u = list(s.strip())
	if u[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


tc = int(input())
x = 0
for loop in range(0, tc):
	str = input()
	if '++' in str:
		x = x + 1
	else:
		x = x - 1
print(x)


def Sol(arr):
	x = 0
	for i in arr:
		if '+' in i:
			x += 1
		else:
			x -= 1
	print(x)
	return
arr = []
for t in range(int(input())):
	arr.append(input())
Sol(arr)


num = int(input())
ans = 0
for z in range(num):
	if '+' in input():
		ans += 1
	else:
		ans -= 1
print(ans)


a = int(input())
total = 0
for i in range(a):
	s = input()
	if s.__contains__('+'):
		total += 1
	elif s.__contains__('-'):
		total -= 1
print(total)


index = int(input())
int_list = []
inc = 'X++'
var = 0
while index != 0:
	int_list.append(input())
	index -= 1
for i in int_list:
	if i == inc or i == inc[::-1]:
		var += 1
	else:
		var -= 1
print(var)


__author__ = 'zhangxun'

def main():
	result = 0
	for i in range(int(input())):
		action = input()
		if action[0] in ['+', '-']:
			if action[0] == '+':
				result += 1
			else:
				result -= 1
		elif action[-1] == '+':
			result += 1
		else:
			result -= 1
	print(result)

def main_one_line_try():
	print()
main()


n = int(input())
count = 0
while n != 0:
	st = list(input())
	if st[0] == '+' or st[2] == '+':
		count += 1
	elif st[0] == '-' or st[2] == '-':
		count -= 1
	n -= 1
print(count)


t = int(input())
count = 0
for i in range(t):
	string = input()
	if '+' in string:
		count += 1
	elif '-' in string:
		count -= 1
print(count)


n = int(input())
count = 0
for i in range(n):
	t = input()
	if t[0] == '+' or t[2] == '+':
		count += 1
	else:
		count -= 1
print(count)


t = int(input())
x = 0
for cases in range(t):
	s = input()
	if '++' in s:
		x += 1
	elif '--' in s:
		x -= 1
print(x)


N = int(input())
l = [input() for i in range(N)]
x = 0
for i in l:
	if i == 'X++' or i == '++X':
		x = x + 1
	elif i == 'X--' or i == '--X':
		x = x - 1
print(x)


n = int(input())
val = 0
for i in range(n):
	operation = input()
	if operation == '++X' or operation == 'X++':
		val = val + 1
	if operation == '--X' or operation == 'X--':
		val = val - 1
print(val)


n = int(input())
x = 0
for i in range(n):
	s = input()
	for j in s:
		if j == '+':
			x += 1
			break
		elif j == '-':
			x -= 1
			break
		else:
			continue
print(x)


n = int(input())
ans = 0
x = 'X'
y = '--'
z = '++'
for i in range(n):
	m = str(input())
	if m == x + y or m == y + x:
		ans -= 1
	if m == x + z or m == z + x:
		ans += 1
print(ans)


x = 0
n = int(input())
string = []
for k in range(n):
	string.append(input())
for j in range(len(string)):
	if string[j] in ['++X', 'X++']:
		x += 1
	elif string[j] in ['--X', 'X--']:
		x -= 1
print(x)


a = int(input())
p = 0
for i in range(a):
	b = input()
	m = list(b)
	if m[1] == '+':
		p += 1
	else:
		p -= 1
print(p)


a = int(input())
b = sum((input().count('+') > 0 for i in range(a)))
print(2 * b - a)


import sys

def check_int(s):
	if s[0] in ('-', '+'):
		return s[1:].isdigit()
	return s.isdigit()

def check_float(s):
	try:
		float(s)
		return True
	except ValueError:
		return False

def read_line():
	line = sys.stdin.readline().rstrip('\n')
	return line

def read_seq(convert_type=False):
	line = read_line()
	seq = line.split(' ')
	if convert_type == False:
		return seq
	else:
		seq_t = []
		for i in range(0, len(seq)):
			if check_int(seq[i]):
				seq_t.append(int(seq[i]))
			elif check_float(seq[i]):
				seq_t.append(float(seq[i]))
			else:
				seq_t.append(seq[i])
		return seq_t

def read_value(type='string'):
	seq = read_seq()
	assert len(seq) == 1
	if type == 'int':
		return int(seq[0])
	elif type == 'float':
		return float(seq[0])
	return seq[0]
N = read_value('int')
x = 0
for i in range(0, N):
	s = read_line()
	if s == 'X++' or s == '++X':
		x = x + 1
	else:
		x = x - 1
print(x)


c = int(input())
x = 0
for i in range(c):
	action = input()
	if '--' in action:
		x -= 1
	else:
		x += 1
print(x)


import sys
N = int(input())
x = 0
while N > 0:
	instruction = input()
	if '+' in instruction:
		x += 1
	else:
		x -= 1
	N -= 1
print(x)


n = int(input())
x = 0
for _ in range(n):
	command = str(input())
	if '+' in command:
		x += 1
	elif '-' in command:
		x -= 1
	else:
		pass
print(x)


x = int(input())
cnt = 0
for i in range(x):
	str = input()
	if '++' in str:
		cnt += 1
	else:
		cnt -= 1
print(cnt)


operation = int(0)
res = int(0)
bits = [5]
operation = int(input())
while operation != 0:
	bits = input()
	if bits[1] == '+' or bits[0] == '+' or bits[2] == '+':
		res = res + 1
	else:
		res = res - 1
	operation = operation - 1
print(res, '', end='')


def bitland(n, a):
	result = 0
	plus = '++'
	minus = '--'
	for line in a:
		for (i, j) in enumerate(line):
			b = line[i:i + 2]
			if len(b) < 2:
				break
			if b == plus:
				result += 1
				break
			elif b == minus:
				result -= 1
				break
	return result

def main():
	n = int(input())
	a = []
	for i in range(n):
		line = input()
		a.append(line)
	b = bitland(n, a)
	print(b)
main()


n = int(input())
s = 0
for x in range(0, n):
	b = input()
	if b.count('++') > 0:
		s += 1
	else:
		s -= 1
print(s)


numero = int(input())
cont = 0
for e in range(numero):
	if '-' in input():
		cont -= 1
	else:
		cont += 1
print(cont)


total = int(input())
print(sum((-1 if '--' in l else 1 for l in (input() for i in range(total)))))


row_num = int(input())
plus = [0 for i in range(row_num)]
minus = [0 for i in range(row_num)]
for i in range(row_num):
	line = input()
	plus[i] = line.count('+')
	minus[i] = line.count('-')
print(int((sum(plus) - sum(minus)) / 2))


words = []
res = 0
n = eval(input())
for i in range(n):
	ss = input('')
	words.append(n)
	if ss[1] == '+':
		res = res + 1
	elif ss[1] == '-':
		res = res - 1
print(res)


def mod():
	n = int(input())
	new = []
	me = []
	for i in range(n):
		c = input()
		new.append(c)
	for j in new:
		if j == 'X++':
			x = 1
			me.append(x)
		elif j == '++X':
			z = 1
			me.append(z)
		elif j == '--X':
			y = -1
			me.append(y)
		elif j == 'X--':
			f = -1
			me.append(f)
	k = sum(me)
	print(k)
mod()


n = int(input())
ans = 0
while n > 0:
	s = str(input())
	sList = list(s)
	while len(sList) > 0:
		if sList[0] == 'X':
			sList.remove('X')
		elif sList[0] == '+':
			sList.remove('+')
			sList.remove('+')
			ans = ans + 1
			print()
		elif sList[0] == '-':
			sList.remove('-')
			sList.remove('-')
			ans = ans - 1
	n = n - 1
print(ans)


import math
k = int(input())
t = 0
i = 0
while i < k:
	s = input()
	if s == 'X++':
		t += 1
	elif s == '++X':
		t += 1
	elif s == '--X':
		t -= 1
	elif s == 'X--':
		t -= 1
	i += 1
print(t)


a = int(input())
i = 0
lst = []
r = 0
for i in range(a):
	v = input()
	lst.append(v)
for j in lst:
	if j == '++X' or j == 'X++':
		r = r + 1
	elif j == '--X' or j == 'X--':
		r = r - 1
print(r)


n = int(input())
X = 0
for i in range(n):
	inp = input()
	if inp == '++X' or inp == 'X++':
		X = X + 1
	elif inp == '--X' or inp == 'X--':
		X = X - 1
	else:
		pass
print(X)


def main():
	num = int(input().strip())
	result = 0
	for i in range(num):
		operation = input().strip()
		if operation[:2] == '++' or operation[1:] == '++':
			result += 1
		if operation[:2] == '--' or operation[1:] == '--':
			result -= 1
	print(result)
main()


n = int(input())
l = []
x = 0
for i in range(n):
	l.append(input())
x = x + (l.count('X++') + l.count('++X'))
x = x - (l.count('--X') + l.count('X--'))
print(x)


l1 = []
x = 0
numOfStat = int(input())
statment = ''
for i in range(numOfStat):
	statment = input()
	l1.append(statment)
for j in l1:
	if j == '++X' or j == 'X++':
		x = x + 1
	elif j == '--X' or j == 'X--':
		x = x - 1
print(x)


from sys import stdin
s = stdin.read()
print((s.count('+') - s.count('-')) // 2)


m = int(input())
i = 0
erg = 0
while i < m:
	x = input()
	if x[1] == '-':
		erg -= 1
	else:
		erg += 1
	i += 1
print(erg)


x = 0
tc = int(input())
for i in range(tc):
	c = input()
	if c == 'X++' or c == '++X':
		x = x + 1
	elif c == 'X--' or c == '--X':
		x = x - 1
print(x)


n = int(input())
if n >= 1 and n <= 150:
	pass
else:
	exit()
lines = []
i = 0
while i < n:
	line = input()
	lines.append(line)
	i += 1
val = 0
for i in lines:
	if i == 'X++' or i == '++X':
		val += 1
	if i == 'X--' or i == '--X':
		val -= 1
print(val)


a = int(input())
c = 0
while a > 0:
	a -= 1
	s = input()
	if '++' in s:
		c += 1
	else:
		c -= 1
print(c)


n = int(input())
c = 0
l = []
for i in range(n):
	a = input()
	l.append(a)
for i in l:
	if i[0] == '+' or i[1] == '+':
		c += 1
	else:
		c -= 1
print(c)


n = int(input())
(i, x) = (1, 0)
while i <= n:
	si = input()
	if si[1] == '+':
		x = x + 1
	else:
		x = x - 1
	i = i + 1
print(x)


import sys
n = int(sys.stdin.readline())
result = 0
for x in range(n):
	str_op = sys.stdin.readline()
	if str_op[1] == '-':
		result -= 1
	if str_op[1] == '+':
		result += 1
print(result)


bit = int(input())
X = 0
if 1 <= bit <= 150:
	for i in range(bit):
		operation = str(input())
		if operation == 'X++' or operation == '++X':
			X = X + 1
		if operation == 'X--' or operation == '--X':
			X = X - 1
print(X)


n = int(input())
plus_plus = lambda x: x + 1
minus_minus = lambda x: x - 1
cmds = {'--': minus_minus, '++': plus_plus}
start_value = 0
res = start_value
for i in range(n):
	cmd = input()
	for key in cmds.keys():
		if cmd.find(key) != -1:
			res = cmds[key](res)
print(res)


t = int(input())
op1 = ['++X', 'X++']
op2 = ['--X', 'X--']
ans = 0
for i in range(t):
	s = input()
	if s in op1:
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
x = 0
for t in range(n):
	k = input()
	if k[0] == '+' or k[-1] == '+':
		x = x + 1
	elif k[0] == '-' or k[-1] == '-':
		x = x - 1
print(x)


n = int(input())
stlist = []
for i in range(0, n):
	stlist.append(input())
x = 0
for k in stlist:
	if k == 'X++':
		x = x + 1
	if k == '++X':
		x = x + 1
	if k == 'X--':
		x = x - 1
	if k == '--X':
		x = x - 1
print(x)


def bit_plus_plus():
	x = 0
	for _ in range(int(input())):
		line = input()
		if '++' in line:
			x += 1
		if '--' in line:
			x -= 1
	print(x)
bit_plus_plus()


def bit(num):
	var = 0
	for i in range(0, num):
		operators = str(input())
		if '+' in operators:
			var += 1
		else:
			var -= 1
	print(var)
num = int(input())
bit(num)


try:
	n = int(input())
	inp = ''
	i = 0
	cnt = 0
	while i < n:
		inp = input()
		if inp.count('++') == 1:
			cnt += 1
		if inp.count('--') == 1:
			cnt -= 1
		i += 1
	print(cnt)
except ValueError:
	print('Unexpected value')


n = int(input())
x = 0
my_list = ['X++', '++X', 'X--', '--X']
my_list2 = []
for i in range(1, n + 1):
	f = str(input())
	my_list2.append(f)
for h in range(0, len(my_list2)):
	if my_list2[h] == my_list[0] or my_list2[h] == my_list[1]:
		x = x + 1
	elif my_list2[h] == my_list[2] or my_list2[h] == my_list[3]:
		x = x - 1
print(x)


def countValue(li: list) -> int:
	val = 0
	for i in range(len(li) - 1):
		if li[i] == '+':
			i = i + 1
			if li[i] == '+':
				val = val + 1
		elif li[i] == '-':
			i = i + 1
			if li[i] == '-':
				val = val - 1
	return val

def main():
	n = int(input())
	final_val = 0
	while n > 0:
		s = input()
		li = []
		for i in s:
			li.append(i)
		final_val += countValue(li)
		n = n - 1
	print(final_val)
main()


no_of_instr = int(input(''))
init_val = 0
for i in range(no_of_instr):
	stmt = input('')
	if stmt.upper() == 'X++' or stmt.upper() == '++X':
		init_val += 1
	elif stmt.upper() == 'X--' or stmt.upper() == '--X':
		init_val -= 1
print(init_val)


trial = int(input())
buf = 0
for i in range(0, trial):
	op = input()
	if '++' in op:
		buf += 1
	else:
		buf -= 1
print(buf)


n = input()
A = {'++X', 'X++'}
a = 0
b = 0
for i in range(int(n)):
	m = input()
	if str(m) in A:
		a = a + 1
	else:
		b += 1
print(a - b)


n = int(input())
v = 0
while n > 0:
	s = input()
	if s[1] == '+':
		v = v + 1
	else:
		v = v - 1
	n = n - 1
print(v)


times = int(input())
time = 1
answer = 0
while time <= times:
	s = list(input())
	for i in s:
		if i == '+':
			answer = answer + 1
			break
		if i == '-':
			answer = answer - 1
			break
	time = time + 1
print(str(answer))


operates = {'++': 1, '--': -1}

def operation(s):
	s = s.split('X')
	return sum([operates[i] for i in s if i != ''])
n = int(input())
c = 0
for i in range(n):
	s = input()
	c += operation(s)
print(c)


somme = 0
lenth = int(input())
for i in range(lenth):
	operation = input()
	if '++' in operation:
		somme += 1
	else:
		somme -= 1
print(somme)


x = 0
numoflines = int(input())
for i in range(numoflines):
	command = input()
	if '+' in command:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
i = 0
x = 0
while i in range(n):
	cod = input()
	a = cod.find('++')
	b = cod.find('--')
	if a != -1:
		x = x + 1
	if b != -1:
		x = x - 1
	i = i + 1
print(x)


T = int(input())
ans = 0
for i in range(T):
	temp = input()
	if temp[1] == '+':
		ans = ans + 1
	elif temp[1] == '-':
		ans = ans - 1
print(ans)


in1 = int(input())
x = 0
for i in range(in1):
	l1 = input()
	if l1[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


x = 0
print(sum((x + 1 if '+' in input() else x - 1 for case in range(int(input())))))


X = int(input())
l = []
b = 0
for i in range(X):
	x = input('')
	l.append(x)
for i in range(X):
	a = l[i]
	if a[1] == '+' or a[2] == '+':
		b += 1
	elif a[1] == '-' or a[2] == '-':
		b -= 1
print(b)


a = int(input())
x1 = 0
x2 = 0
for i in range(a):
	b = str(input())
	if b == 'X++' or b == '++X':
		x1 += 1
	if b == 'X--' or b == '--X':
		x1 -= 1
print(x1)


n = int(input())
x = 0
for i in range(n):
	operate = input()
	if operate[0] == '+' or operate[1] == '+' or operate[2] == '+':
		x += 1
	elif operate[0] == '-' or operate[1] == '-' or operate[2] == '-':
		x -= 1
	else:
		pass
print(x)


n = int(input())
t = 0
for s in range(n):
	s = input()
	if s == '++X' or s == 'X++':
		t = t + 1
	elif s == '--X' or s == 'X--':
		t = t - 1
print(t)


n = int(input())
add = []
for i in range(n):
	s = input()
	if '+' in s:
		add.append(1)
	elif '-' in s:
		add.append(-1)
	else:
		continue
print(sum(add))


x = 0
t = int(input(''))
while t != 0:
	operation = input('')
	if '--' in operation:
		x -= 1
	else:
		x += 1
	t -= 1
print(x)


numofline = int(input())
x = 0
for i in range(numofline):
	opp = input()
	if opp[0] == '+' or opp[2] == '+':
		x += 1
	elif opp[0] == '-' or opp[2] == '-':
		x -= 1
print(x)


t = int(input())
x = 0
for _ in range(t):
	i = input()
	for k in i:
		if k == '+':
			x += 1 / 2
		elif k == '-':
			x -= 1 / 2
print(int(x))


num = int(input())
value = -0
if num == 0:
	print(0)
else:
	for i in range(num):
		inc = input()
		if '++' in inc:
			value = value + 1
		else:
			value = value - 1
print(value)


t = int(input())
z = 0
for _ in range(t):
	l = [str(x) for x in input().split()]
	for i in range(len(l)):
		if l[i] == '++X' or l[i] == 'X++':
			z = z + 1
		else:
			z = z - 1
print(z)


n = int(input())
a = 0
b = 0
for i in range(n):
	str1 = input()
	str1 = str1.strip('X')
	if str1 == '++':
		a = a + 1
	elif str1 == '--':
		b = b + 1
	else:
		a = a
		b = b
print(a - b)


n = int(input())
a = 0
for i in range(n):
	statement = str(input())
	if '++' in statement:
		a = a + 1
	if '--' in statement:
		a = a - 1
print(a)


n = int(input())
count = 0
for i in range(n):
	st = input()
	if st[1:] == '++' or st[:-1] == '++':
		count = count + 1
	else:
		count = count - 1
print(count)


n = int(input())
s = 0
for i in range(n):
	op = input()
	if op == 'X++' or op == '++X':
		s = s + 1
	elif op == 'X--' or op == '--X':
		s = s - 1
	else:
		assert False
print(s)


n = int(input())
num = 0
for i in range(n):
	b = str(input())
	if b == '++X' or b == 'X++':
		num += 1
	elif b == '--X' or b == 'X--':
		num -= 1
print(num)


n = int(input())
x = 0
for e in range(0, n):
	instruction = input()
	if instruction.find('++') != -1:
		x += 1
	elif instruction.find('--') != -1:
		x -= 1
print(x)


i = int(input())
res = 0
for x in range(0, i):
	_in = input()
	if '++' in _in:
		res += 1
	elif '--' in _in:
		res -= 1
	pass
print(res)


OperationNo = int(input())
index = 0
rezultat = 0
Operatii = ''
for index in range(OperationNo):
	Operatii += input() + ' '
OperatiiSplit = Operatii.split(' ')
for index in range(len(OperatiiSplit)):
	if '++' in OperatiiSplit[index]:
		rezultat += 1
	elif '--' in OperatiiSplit[index]:
		rezultat -= 1
print(rezultat)


n = int(input())
val = 0
for i in range(n):
	oprn = str(input())
	oprn = list(oprn)
	if '+' in oprn:
		val = val + 1
	else:
		val = val - 1
print(val)


t = int(input())
x = 0
for _ in range(t):
	s = input()
	if s[0] == '+' and s[1] == '+' or (s[2] == '+' and s[1] == '+'):
		x += 1
	elif s[0] == '-' and s[1] == '-' or (s[2] == '-' and s[1] == '-'):
		x -= 1
print(x)


n = int(input())
a = 0
for i in range(n):
	cizu = input()
	if '+' in cizu:
		a += 1
s = a * 2 - n
print(s)


no = int(input())
x = 0
for i in range(no):
	comm = input()
	if '++' in comm:
		x += 1
	elif '--' in comm:
		x -= 1
print(x)


t = int(input())
val = 0
for tt in range(t):
	x = str(input())
	if x == 'X++' or x == '++X':
		val = val + 1
	elif x == '--X' or x == 'X--':
		val = val - 1
	else:
		val = val
print(val)


x = 0
n = int(input())
for i in range(n):
	S = input()
	k1 = S.find('++')
	if k1 >= 0:
		x = x + 1
	else:
		x = x - 1
print(x)


n = int(input().strip())
ans = 0
for _ in range(n):
	st = input().strip()
	ans += 1 if '++' in st else -1
print(ans)


total = 0
for _ in range(int(input())):
	line = input()
	if '++' in line:
		total += 1
	else:
		total -= 1
print(total)


a = int(input())
b = []
for i in range(a):
	n = input()
	b.append(n)
x = 0
for j in range(len(b)):
	for i in range(0, len(n), 2):
		if b[j][i] == '+':
			x += 1
		if b[j][i] == '-':
			x -= 1
print(x)


n = int(input())
cnt = 0
for i in range(0, n):
	a = input()
	if a.find('+') >= 0:
		cnt += 1
	else:
		cnt -= 1
print(cnt)


inpu = input(str())
inp = int(inpu)
final = 0
for i in range(1, inp + 1):
	exp = input(str())
	arr = [0] * 3
	for e in range(0, len(exp)):
		arr[e] = exp[e]
	if arr[0] == '+' and arr[1] == '+' or (arr[1] == '+' and arr[2] == '+'):
		final += 1
	elif arr[0] == '-' and arr[1] == '-' or (arr[1] == '-' and arr[2] == '-'):
		final -= 1
print(final)


def bit():
	a = int(input())
	k = 0
	for i in range(a):
		r = input()
		for item in r:
			if item == '+':
				k += 1
				break
			elif item == '-':
				k = k - 1
				break
	print(k)
bit()


n = int(input())
res = 0
while n > 0:
	n -= 1
	cmd = input()
	if cmd[0] == '+' or cmd[2] == '+':
		res += 1
	else:
		res -= 1
print(res)


n = int(input())
l = []
for i in range(n):
	l.append(input())
c = 0
for i in l:
	if i[0] == '+':
		c += 1
	elif i[2] == '+':
		c += 1
	elif i[0] == '-':
		c -= 1
	elif i[2] == '-':
		c -= 1
print(c)


n = int(input())
x = 0
for i in range(n):
	statement = str(input())
	if statement[0] is '+' or statement[1] is '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
num = 0
for i in range(n):
	a = input()
	b = a[1]
	if b == '+':
		num += 1
	if b == '-':
		num += -1
print(num)


n = int(input())
k = 0
for i in range(n):
	s = input()
	for j in range(2):
		if s[j] == '+' or s[j + 1] == '+':
			k += 1
			break
		else:
			k -= 1
			break
print(k)


x = int(input())
a = 0
while x != 0:
	y = input()
	if '++' in y:
		a = a + 1
	elif '--' in y:
		a = a - 1
	x -= 1
print(a)


try:
	n = int(input())
	if n >= 1 and n <= 150:
		(s, x, c) = ([], 0, True)
		for i in range(n):
			s = input()
			if s in ['++x', 'x++', '++X', 'X++']:
				x += 1
			elif s in ['--x', 'x--', '--X', 'X--']:
				x -= 1
			else:
				c = False
				break
		if c == True:
			print(x)
except:
	pass


statements = int(input())
x = 0
for i in range(0, statements):
	newIn = str(input())
	if newIn[0] == '+' and newIn[1] == '+':
		x += 1
	elif newIn[1] == '+' and newIn[2] == '+':
		x += 1
	elif newIn[0] == '-' and newIn[1] == '-':
		x -= 1
	elif newIn[1] == '-' and newIn[2] == '-':
		x -= 1
print(x)


n = int(input())
i = 0
m = 0
while i < n:
	s = input()
	i += 1
	if s == 'X++' or s == '++X':
		m += 1
	if s == 'X--' or s == '--X':
		m -= 1
print(m)


n = int(input())
ops = []
x = 0
for i in range(n):
	ops.append(input())
for op in ops:
	if op.count('+') == 2:
		x += 1
	elif op.count('-') == 2:
		x -= 1
print(x)


m = int(input())
z = 0
e = 0
while z < m:
	n = input()
	if n == 'X++' or n == '++X':
		e += 1
	elif n == 'X--' or n == '--X':
		e -= 1
	z += 1
print(e)


n = int(input())
(p, q) = (0, 0)
for i in range(1, n + 1):
	st = input()
	if '++' in st:
		p += 1
	else:
		q += 1
print(p - q)


n = int(input())
operations = ['++X', 'X++', '--X', 'X--']
li = [input() for i in range(n)]
count = 0
for i in li:
	if i == operations[0] or i == operations[1]:
		count += 1
	elif i == operations[2] or i == operations[3]:
		count -= 1
print(count)


class BitPPParser:

	def __init__(self):
		self.x = 0

	def parse(self, line):
		try:
			if line.index('++') >= 0:
				self.x += 1
		except ValueError:
			self.x -= 1

def run_alg():
	num_ops = int(input())
	bpp = BitPPParser()
	for _ in range(num_ops):
		bpp.parse(input())
	print(bpp.x)
run_alg()


n = int(input())
res = 0
for each_n in range(n):
	s = input()
	if s[0] == '+' or s[-1] == '+':
		res = res + 1
	else:
		res = res - 1
print(res)


def BitPlusPlus(inst):
	plus = 0
	moins = 0
	for i in inst:
		p = i.split('X')
		for j in p:
			if j == '++':
				plus = plus + 1
			if j == '--':
				moins = moins + 1
	return plus - moins
x = input().strip('\n')
y = int(x)
ch = ''
if int(x) >= 1 and int(x) <= 150:
	for i in range(0, y):
		ch = ch + input().strip('\n') + ' '
	print(BitPlusPlus(ch.split(' ')))


a = input()
a = int(a)
count = 0
for i in range(a):
	b = input()
	if b[0] == '+':
		count += 1
	elif b[0] == '-':
		count -= 1
	elif b[0] == 'X':
		if b[1] == '+':
			count += 1
		else:
			count -= 1
print(count)


cad = int(input())
n = 0
for x in range(cad):
	val = input()
	if '++' in val:
		n = n + 1
	if '--' in val:
		n = n - 1
print(n)


n = int(input())
array = [input() for _ in range(n)]
x = 0
for i in range(len(array)):
	if array[i] == 'X++' or array[i] == '++X':
		x = x + 1
	else:
		x = x - 1
print(x)


statement_number = int(input())
x = 0
for i in range(statement_number):
	statment = input()
	if statment == 'X++' or statment == '++X':
		x = x + 1
	else:
		x = x - 1
print(x)


a = int(input())
sum = 0
for y in range(1, a + 1):
	a = input()
	if a == 'X++' or a == '++X':
		sum = sum + 1
	else:
		sum = sum - 1
print(sum)


count = int(input())
res = 0
for i in range(count):
	st = str(input())
	if st[1] == '+':
		res += 1
	elif st[1] == '-':
		res -= 1
print(res)


n = int(input())
x = 0
for i in range(n):
	s = list(input())
	if s[0] == 'X':
		if s[1] == '+' and s[2] == '+':
			x += 1
		elif s[1] == '-' and s[2] == '-':
			x -= 1
	elif s[0] == '+' and s[1] == '+' and (s[2] == 'X'):
		x += 1
	elif s[0] == '-' and s[1] == '-' and (s[2] == 'X'):
		x -= 1
print(x)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
n = inp()
sum = 0
for i in range(n):
	text = ''.join(insr())
	if text.find('++') > -1:
		sum += 1
	else:
		sum -= 1
print(sum)


c = int(input())
count = 0
while c != 0:
	c = c - 1
	s = input()
	if '+' in s:
		count = count + 1
	elif '-' in s:
		count = count - 1
print(count)


num_of_test_cases = int(input())
x = 0
for i in range(num_of_test_cases):
	operation = set((i for i in input()))
	if '+' in operation:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
c = 0
for _ in range(n):
	a = list(input())
	if '+' in a:
		c += 1
	else:
		c -= 1
print(c)


n = int(input())
x = 0
for i in range(n):
	strk = ''
	strk = input()
	if strk[0] == '+' and strk[1] == '+' or (strk[-2] == '+' and strk[-1] == '+'):
		x += 1
	elif strk[0] == '-' and strk[1] == '-' or (strk[-2] == '-' and strk[-1] == '-'):
		x -= 1
print(x)


x = 0
n = int(input())
for i in range(0, n):
	a = list(input())
	for j in a:
		if j == '+':
			x += 1
			break
		elif j == '-':
			x -= 1
			break
print(x)


import sys
n = int(sys.stdin.readline())
x = 0
for _ in range(n):
	op = sys.stdin.readline().strip()
	if op[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
res = 0
for i in range(n):
	a = input()
	a.split()
	if '+' in a:
		res += 1
	if '-' in a:
		res -= 1
print(res)


n = int(input())
q = 0
for i in range(0, n):
	a = input()
	for i in a:
		if i == 'X':
			pass
		elif i == '+':
			q += 1
			break
		elif i == '-':
			q -= 1
			break
print(q)


a = input().strip()
value = 0
for i in range(int(a)):
	b = input().strip()
	if b.find('+') != -1:
		value += 1
	elif b.find('-') != -1:
		value -= 1
print(value)


n = list(map(int, input().split()))[0]
x = 0
for i in range(n):
	str0 = input()
	if str0[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


num = int(input())
xpos = 0
xneg = 0
S1 = '++X'
S2 = 'X--'
S3 = '--X'
S4 = 'X++'
for i in range(num):
	userinput = input()
	if userinput == S2:
		xneg = xneg - 1
	elif userinput == S1:
		xpos = xpos + 1
	elif userinput == S3:
		xpos = xpos - 1
	elif userinput == S4:
		xpos = xpos + 1
res = xpos + xneg
print(res)


import sys
a = 0
b = input()
for line in sys.stdin:
	if '++' in line:
		a += 1
	else:
		a -= 1
print(a)


lines = int(input())
output = 0
for i in range(0, lines):
	bit_command = input()
	if bit_command == 'X++' or bit_command == '++X':
		output = output + 1
	elif bit_command == 'X--' or bit_command == '--X':
		output = output - 1
print(output)


lines = int(input())
x = 0
for i in range(lines):
	ip = str(input())
	if ip[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


X = 0
for _ in range(int(input())):
	op = input()
	if op == '++X' or op == 'X++':
		X += 1
	elif op == 'X--' or op == '--X':
		X -= 1
print(X)


def change_value(n_lines):
	n_executions = 0
	var = 0
	while n_executions < n_lines:
		statement = input()
		if statement[1] == '+':
			var += 1
		else:
			var -= 1
		n_executions += 1
	print(var)
num_lines = int(input())
change_value(num_lines)


n = int(input())
b = '+'
s = 0
for n in range(0, n, 1):
	a = str(input())
	if a[0] == b:
		s += 1
	elif a[2] == b:
		s += 1
	else:
		s -= 1
print(s)


x = 0
n = int(input())
for i in range(n):
	instruccion = input()
	j = 0
	encontrado = False
	while j < 3 and (not encontrado):
		if instruccion[j] == '+':
			x = x + 1
			encontrado = True
		if instruccion[j] == '-':
			x = x - 1
			encontrado = True
		j = j + 1
print(x)


test_cases = int(input())
x = 0
for i in range(test_cases):
	op = input()
	if '+' in op:
		x += 1
	if '-' in op:
		x -= 1
print(x)


a = input()
x = 0

def check(t):
	if t == 'X++':
		return 1
	elif t == '++X':
		return 1
	elif t == '--X':
		return -1
	elif t == 'X--':
		return -1
	else:
		pass
if int(a) in range(151):
	for i in range(int(a)):
		temp = input()
		ans = check(temp)
		x = x + ans
	print(x)
elif int(a) == 0:
	pass
else:
	pass


x = int(input())
a = 0
list1 = []
ans = 0
while a < x:
	order = str(input())
	list1.append(order)
	a += 1
for orderX in list1:
	if orderX == '++X' or orderX == 'X++':
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
ini = 0
bp1 = 'X++'
bp2 = '++X'
bm1 = 'X--'
bm2 = '--X'
for i in range(n):
	bit = input()
	if bit == bp1 or bit == bp2:
		ini += 1
	elif bit == bm1 or bit == bm2:
		ini -= 1
print(ini)


n = eval(input())
s = 0
for k in range(n):
	i = input().find('+', 1)
	s += i
print(s)


n = int(input())
x = 0
for i in range(n):
	command = input()
	if '++' in command:
		x += 1
	elif '--' in command:
		x -= 1
	else:
		raise ValueError(f'invalid command {command}')
print(x)


n = int(input())
i = 0
for _ in range(n):
	t = input()
	if t == 'X++' or t == '++X':
		i += 1
	elif t == 'X--' or t == '--X':
		i -= 1
print(i)


operations = input('')
x = 0
num = int(operations)
for i in range(num):
	operations = input()
	if operations == '++X':
		x += 1
	if operations == 'X++':
		x += 1
	if operations == '--X':
		x -= 1
	if operations == 'X--':
		x -= 1
print(x)


n = int(input())
a = []
for i in range(n):
	w = input()
	a.append(w)
p = a.count('X++') + a.count('++X')
m = a.count('X--') + a.count('--X')
print(p - m)


a = 0
for x in [0] * int(input()):
	a += [1, -1][input().count('-') > 0]
print(a)


n = int(input())
var = 0
for i in range(n):
	cmd = str(input())
	if '++' in cmd:
		var += 1
	elif '--' in cmd:
		var -= 1
print(var)


l = 0
for i in range(int(input())):
	a = input()
	if '++' in a:
		l += 1
	if '--' in a:
		l -= 1
print(l)


import sys, itertools
count = int(next(sys.stdin))
x = 0
for line in itertools.islice(sys.stdin, count):
	x += 1 if '++' in line else -1
print(x)


i = int(input())
count = 0
x = 0
while count < i:
	read = input()[1]
	if read == '+':
		x += 1
	else:
		x -= 1
	count += 1
print(x)


n = int(input())
a = 0
for x in range(n):
	s = input()
	s = s.translate(str.maketrans('', '', 'X'))
	if s == '++':
		a += 1
	else:
		a -= 1
print(a)


t = int(input())
a = []
for i in range(t):
	a.append(input())
x = 0
for i in a:
	if i == 'X++' or i == '++X':
		x = x + 1
	elif i == 'X--' or i == '--X':
		x = x - 1
print(x)


a = int(input())
x = 0
for i in range(a):
	y = input()
	for b in range(len(y)):
		if y[b] == '+':
			x += 1
			break
		elif y[b] == '-':
			x -= 1
			break
print(x)


x = 0
for a in [0] * int(input()):
	b = input()
	if b.count('X') == 1:
		if b.count('+') == 2:
			x += 1
		elif b.count('-') == 2:
			x -= 1
print(x)


try:
	col = int(input())
	ans = 0
	while col != 0:
		oper = input()
		if oper == 'X++' or oper == '++X':
			ans = ans + 1
		elif oper == '--X' or oper == 'X--':
			ans = ans - 1
		col = col - 1
	print(ans)
except EOFError:
	print('ERROR,EOFError')
except NameError:
	print('ERROR, NameError')


t = int(input())
x = 0
a = '++XX++'
b = '--XX--'
for i in range(0, t, 1):
	c = str(input())
	if c in a:
		x = x + 1
	elif c in b:
		x = x - 1
print(x)


number_of_operations = input()
x = 0
for operations in range(int(number_of_operations)):
	operation = input()
	if '++' in operation:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
increment = 0
decrement = 0
for i in range(n):
	statement = input()
	if statement[0] == '+' or statement[-1] == '+':
		increment += 1
	else:
		decrement += 1
x = increment - decrement
print(x)


n = int(input())
x = 0
c = 0
while c < n:
	s = input()
	if s[1] == '+':
		x = x + 1
	else:
		x = x - 1
	c += 1
print(x)


t = int(input())
x = 0
for i in range(t):
	str1 = input()
	if str1[0] == '+' or str1[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


k = 0
h = 0
s = 0
g = 0
d = 0
x = 0
l = []
n = int(input())
while k < n:
	st = input()
	l.append(st)
	k += 1
for j in range(0, n):
	for i in l[j]:
		if i == '+':
			h += 1
		if i == '-':
			g += 1
	if h == 2:
		s += 1
		h = 0
	if g == 2:
		d += 1
		g = 0
x = x + s - d
print(x)


n = int(input())
xarr = []
x = 0
for i in range(0, n):
	xarr.append(input())
for i in range(0, n):
	if xarr[i] == '++X':
		x += 1
	elif xarr[i] == 'X++':
		x += 1
	elif xarr[i] == '--X':
		x -= 1
	elif xarr[i] == 'X--':
		x -= 1
print(x)


def solution():
	arr = []
	for _ in range(int(input())):
		arr.append(input())
	res = 0
	for x in arr:
		if x[0] == '+' or x[-1] == '+':
			res += 1
		else:
			res -= 1
	print(res)
solution()


import math
import sys
input = sys.stdin.readline

def inp():
	return int(input())
n = inp()
c = 0
while n > 0:
	o = input()
	if '+' in o:
		c += 1
	else:
		c -= 1
	n -= 1
print(c)


a = 0
n = int(input())
for x in range(n):
	l = list(input())
	if '+' in l:
		a += 1
	else:
		a -= 1
print(a)


n = int(input())
l = [input() for i in range(n)]
x = 0
for el in l:
	if '--' in el:
		x -= 1
	if '++' in el:
		x += 1
print(x)


def main(statments):
	x = 0
	for i in statments:
		if i[0] == 'X':
			if i[-1] == '+':
				x += 1
			else:
				x -= 1
		elif i[0] == '+':
			x += 1
		else:
			x -= 1
	return x
statments = []
for i in range(int(input())):
	statments.append(input())
print(main(statments))


import sys
from collections import Counter
c = Counter(sys.stdin.read())
print((c['+'] - c['-']) // 2)


d = int(input())
x = 0
for t in range(d):
	t = str(input())
	if '++' in t:
		x += 1
	elif '--' in t:
		x -= 1
print(x)


n = int(input())
x = 0
for i in range(n):
	s = input()
	pos = 0
	while pos < len(s):
		if s[pos] == 'X':
			pos += 1
			continue
		else:
			if s[pos] == '+':
				x += 1
			else:
				x -= 1
			pos += 2
print(x)


x = int(input())
xy = 0
for i in range(0, x):
	y = input()
	if y == 'X++' or y == '++X':
		xy += 1
	elif y == 'X--' or y == '--X':
		xy -= 1
print(xy)


N = int(input())
counter = 0
for i in range(N):
	command = input()
	if '+' in command:
		counter += 1
	else:
		counter -= 1
print(counter)


t = int(input())
count = 0
while t:
	temp = str(input())
	if temp == 'X++' or temp == '++X':
		count += 1
	elif temp == '--X' or temp == 'X--':
		count -= 1
	else:
		pass
	t -= 1
print(count)


n = int(input())
z = 0
for i in range(n):
	s = input()
	if s[0] == 'X' and s[2] == '+':
		z += 1
	if s[2] == 'X' and s[1] == '+':
		z += 1
	if s[0] == 'X' and s[2] == '-':
		z -= 1
	if s[2] == 'X' and s[0] == '-':
		z -= 1
print(z)


n = int(input())
i = 0
while n > 0:
	n -= 1
	s = input()
	if '++' in s:
		i += 1
	elif '--' in s:
		i -= 1
print(i)


n = int(input())
outcome = 0
for i in range(n):
	stat = list(input())
	if '+' in stat:
		outcome += 1
	elif '-' in stat:
		outcome -= 1
	else:
		pass
print(int(outcome))


value = int(input())
n = 0
lista = []
while n < value:
	p = input()
	lista.append(p)
	n = n + 1
x = 0
for st in lista:
	n = 0
	while n < len(st):
		c = st[n]
		if c == '+':
			op = 's'
		elif c == '-':
			op = 'r'
		n = n + 1
	if op == 's':
		x = x + 1
	else:
		x = x - 1
print(x)


n = int(input())
op = ['++X', 'X++']
output = 0
for i in range(n):
	language = input()
	if language in op:
		output = output + 1
	else:
		output = output - 1
print(output)


def main():
	a = 0
	for i in range(int(input())):
		t = input()
		if '++' in t:
			a += 1
		else:
			a -= 1
	print(a)
main()


n = int(input())
lst = []
for _ in range(n):
	input_x = input()
	x = [x for x in input_x]
	plus = x.count('+')
	minus = x.count('-')
	X = x.count('X')
	if X == 1 and (plus == 2 or minus == 2):
		lst.append(input_x)
result = 0
for i in range(len(lst)):
	if '+' in lst[i]:
		result += 1
	elif '-' in lst[i]:
		result -= 1
print(result)


n = int(input())
m = [input() for k in range(n)]
l = 0
for k in m:
	if '-' in k:
		l -= 1
	else:
		l += 1
print(l)


import sys
a = []
n = int(input())
for line in sys.stdin:
	for word in line.split():
		a.append(word)
x = 0
for i in a:
	if i == '++X' or i == 'X++':
		x += 1
	elif i == '--X' or i == 'X--':
		x -= 1
print(x)


n = input()
n = int(n)
x = 0
for i in range(n):
	y = input()
	if y == '++X':
		x = x + 1
	elif y == '--X':
		x = x - 1
	elif i == n:
		break
	elif y == 'X--':
		x = x - 1
	elif y == 'X++':
		x = x + 1
print(x)


def main():
	n = int(input())
	val = 0
	for _ in range(n):
		inp = input()
		if inp[0] == '-' or inp[2] == '-':
			val -= 1
		else:
			val += 1
	print(val)
main()


t = int(input())
c = 0
while t:
	t = t - 1
	a = input()
	if a[1] == '+':
		c += 1
	else:
		c -= 1
print(c)


n = int(input())
line = []
for i in range(n):
	a = input()
	for p in str(a):
		line.append(p)
total = 0
total = total + (line.count('+') - line.count('-')) / 2
print(int(total))


N = int(input())
v = 0
for _ in range(N):
	d = 2 * (input()[1] == '+') - 1
	v += d
print(v)


no = int(input())
X = 0
if 1 <= no <= 150:
	for each in range(0, no):
		line = input()
		if line == 'X++' or line == '++X':
			X += 1
		elif line == 'X--' or line == '--X':
			X -= 1
		else:
			X += 0
	print(X)


n = int(input())
x = 0
last = 0
for i in range(n):
	w = input()
	if w.find('++') >= 0:
		x += 1
		if w[0] == 'X':
			last = 0
		else:
			last = 1
	else:
		x -= 1
		if w[0] == 'X':
			last = 0
		else:
			last = 1
print(x)


n = int(input())
operations = []
comp = 0
for i in range(n):
	operations.append(input())
for i in range(n):
	if '++' in operations[i]:
		comp += 1
	elif '--' in operations[i]:
		comp -= 1
print(comp)


n = 0
number = int(input())
for i in range(number):
	choice = input()
	if choice[0] == '+' or choice[1] == '+':
		n += 1
	else:
		n -= 1
print(n)


def op(s):
	if s[0] == '+' or s[1] == '+':
		return True
	return False
x = 0
for _ in range(int(input())):
	s = input()
	if op(s):
		x += 1
	else:
		x -= 1
print(x)


lst = []
for i in range(int(input())):
	word = str(input())
	lst.append(word)
num = 0
for x in lst:
	if x == '++X' or x == 'X++':
		num += 1
	elif x == '--X' or x == 'X--':
		num -= 1
print(num)


def loop(y):
	x = 0
	for i in range(1, y + 1):
		s = input()
		for n in range(0, len(s)):
			if s[n] == '+' and s[n + 1] == '+':
				x += 1
				break
			elif s[n] == '-' and s[n + 1] == '-':
				x -= 1
				break
			else:
				continue
	print(x)
y = int(input())
loop(y)


n = int(input())
s = 0
m = 0
for i in range(n):
	x = input()
	if x == '++X' or x == 'X++':
		s = s + 1
	if x == '--X' or x == 'X--':
		m = m - 1
q = s + m
print(q)


n = int(input())
x = 0
while n != 0:
	n -= 1
	s = input().strip()
	if s == '++X' or s == 'X++':
		x += 1
	else:
		x -= 1
print(x)


def test_case(lst: list):
	sum = 0
	for (_, val) in enumerate(lst):
		if val == '++X' or val == 'X++':
			sum += 1
			continue
		if val == '--X' or val == 'X--':
			sum -= 1
	print(sum)
n = int(input())
lst = []
for i in range(n):
	exp = input()
	lst.append(exp)
test_case(lst)


n = int(input())
ans = 0
t = 0
while True:
	s = list(input())
	if '+' in s:
		ans += 1
	else:
		ans -= 1
	t += 1
	if t >= n:
		print(ans)
		break


def Solve():
	n = int(input())
	cnt = 0
	for i in range(n):
		s = input()
		if s.find('++') != -1:
			cnt += 1
		else:
			cnt -= 1
	print(cnt)
Solve()


s1 = 0
import sys
for i in range(int(input())):
	s = input()
	if s == '++X' or s == 'X++':
		s1 += 1
	elif s == '--X' or s == 'X--':
		s1 -= 1
print(s1)


a = int(input())
ans = 0
for _ in range(0, a):
	b = list(input())
	if b[0] == '+' or b[1] == '+' or b[2] == '+':
		ans += 1
	elif b[0] == '-' or b[1] == '-' or b[2] == '-':
		ans -= 1
print(ans)


import sys
input = sys.stdin.readline
n = int(input())
x = 0
for i in range(n):
	statement = input()
	if statement.find('+') >= 0:
		x += 1
	else:
		x -= 1
print(x)


ans = 0
for _ in range(int(input())):
	string = input()
	if '++' in string:
		ans += 1
	if '--' in string:
		ans -= 1
print(ans)


a = int(input())
X = 0
for _ in range(a):
	operation = input()
	if operation == str('X++') or operation == str('++X'):
		X += 1
	if operation == str('X--') or operation == str('--X'):
		X -= 1
print(X)


count = 0
t = int(input())
for x in range(t):
	n = input()
	if n == 'X++' or n == '++X':
		count += 1
	else:
		count -= 1
print(count)


from sys import stdin, stdout
inp = stdin.readline
out = stdout.write
n = int(inp().strip())
c = 0
for i in range(n):
	s = inp().strip()
	if '++' in s:
		c += 1
	elif '--' in s:
		c -= 1
out(str(c))


n = int(input())
r = 0
for i in range(n):
	line = input()
	if line[1] == '+':
		r += 1
	elif line[1] == '-':
		r -= 1
print(r)


n = int(input())
x = 0
for i in range(n):
	j = 0
	h = 0
	d = input()
	for u in d:
		if u == '+':
			j += 1
		elif u == '-':
			h += 1
	if j == 2:
		x = x + 1
	elif h == 2:
		x = x - 1
print(x)


T = int(input())
X = 0
for _ in range(T):
	op = input()
	if '++' in op:
		X += 1
	else:
		X -= 1
print(X)


number = int(input())
array = []
numb_index = 0
while numb_index < number:
	array.append(input())
	numb_index += 1
x_plus1 = array.count('X++')
x_plus2 = array.count('++X')
x_minus1 = array.count('--X')
x_minus2 = array.count('X--')
print(x_plus1 + x_plus2 - (x_minus1 + x_minus2))


w = int(input())
a = 0
for i in range(w):
	z = input()
	if z == '++X':
		a += 1
	elif z == 'X++':
		a += 1
	elif z == '--X':
		a -= 1
	elif z == 'X--':
		a -= 1
print(a)


n = int(input())
ans = 0
for i in range(n):
	s = input()
	l = len(s)
	for j in range(l):
		if s[j] == '+':
			ans = ans + 1
			break
		elif s[j] == '-':
			ans = ans - 1
			break
print(ans)


n = int(input())
b = ''
for i in range(n):
	b += str(input())
c = (b.count('+') - b.count('-')) / 2
print(int(c))


x = 0
for index in range(int(input())):
	ask = input()
	if ask[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
res = 0
l = []
ch = ''
for i in range(n):
	ch = ch + input()
l = ch
print(l.count('++') - l.count('--'))


n = int(input())
p = 0
for i in range(n):
	s = input()
	if s[0] == '+' or s[-1] == '+':
		p += 1
	elif s[0] == '-' or s[-1] == '-':
		p -= 1
print(p)


n = input()
n = int(n)
X = 0
while n != 0:
	s = input()
	if '++' in s:
		X = X + 1
	if '--' in s:
		X = X - 1
	n = n - 1
print(X)


n = int(input())
statements = []
for _ in range(n):
	statement = input()
	statements.append(statement)
integer = 0
for stm in statements:
	if stm == '++X' or stm == 'X++':
		integer += 1
	elif stm == '--X' or stm == 'X--':
		integer += -1
print(integer)


operations_count = int(input())
x = 0
for _ in range(operations_count):
	operation = input()
	if '++' in operation:
		x += 1
	elif '--' in operation:
		x -= 1
print(x)


n = int(input())
lst = list()
e = 0
for i in range(0, n):
	expe = input()
	lst.append(expe)
for j in lst:
	if j == '++X' or j == 'X++':
		e += 1
	else:
		e -= 1
print(e)


n = int(input())
value = 0
while n > 0:
	operation = input()
	if '++' in operation:
		value = value + 1
	if '--' in operation:
		value = value - 1
	n = n - 1
print(value)


answer = 0
for i in range(int(input())):
	coman = str(input())
	if coman[1] == '+':
		answer += 1
	else:
		answer -= 1
print(answer)


test = int(input())
x = 0
for _ in range(test):
	w = input().strip('X')
	if w == '++':
		x += 1
	else:
		x -= 1
print(x)


number = int(input())
x = 0
for i in range(0, number):
	yolo = input()
	for i in range(0, 3):
		if yolo[i] == '+':
			x += 1
			break
	else:
		x -= 1
print(x)


a = int(input())
lst = []
for i in range(a):
	i = input()
	i = i.upper()
	lst.append(i)
x = 0
for item in lst:
	if item == '++X' or item == 'X++':
		x = x + 1
	elif item == '--X' or item == 'X--':
		x = x - 1
print(x)


lines = int(input())
answer = 0
for i in range(lines):
	line = input()
	if line[1] == '+':
		answer += 1
	else:
		answer -= 1
print(answer)


num = int(input())
x = 0
for i in range(num):
	statement = input()
	if '++' in statement:
		x += 1
	if '--' in statement:
		x -= 1
print(x)


t = int(input())
c = 0
while t > 0:
	t -= 1
	a = input()
	if a == '++X' or a == 'X++':
		c += 1
	elif a == 'X--' or a == '--X':
		c -= 1
print(c)


operations = int(input())
ans = 0
for _ in range(operations):
	op = input()
	if '+' in op:
		ans += 1
	else:
		ans -= 1
print(ans)


number = int(input())
x = int(0)
substring1 = '++'
for command in range(number):
	command = input()
	if command.find(substring1) != -1:
		x += 1
	else:
		x -= 1
print(x)


inputN = int(input())
inputList = []
x = 0
for i in range(0, inputN):
	q = input()
	inputList.append(q)
for i in range(0, len(inputList)):
	if '+' in inputList[i]:
		x = x + 1
	else:
		x = x - 1
print(x)


def bit_plus(op):
	return 1 if '++' in op else -1
result = 0
n = int(input())
for i in range(0, n):
	result += bit_plus(input())
print(result)


jumlah = input()
x = 0
y = 0
for i in range(int(jumlah)):
	exp = input()
	x = x + y
	y = 0
	if exp == 'X++':
		y += 1
	elif exp == '++X':
		x = x + 1
	elif exp == 'X--':
		y -= 1
	elif exp == '--X':
		x = x - 1
print(x + y)


def main():
	n = int(input())
	x = 0
	for _ in range(n):
		op = set(input())
		if '+' in op:
			x += 1
		else:
			x -= 1
	print(x)
main()


n = int(input())
x = 0
for _ in range(n):
	ins = input()
	if ins.startswith('++') or ins.endswith('++'):
		x += 1
	else:
		x -= 1
print(x)


N = int(input())
c = 0
for i in range(N):
	s = input()
	if s.find('+') != -1:
		c = c + 1
	else:
		c = c - 1
print(c)


a = int(input())
b = 0
while a > 0:
	c = input()
	if c == 'X++' or c == '++X':
		b = b + 1
	else:
		b = b - 1
	a = a - 1
print(b)


nl = int(input())
res = 0
for i in range(nl):
	op = input()
	if op.find('+') != -1:
		res += 1
	else:
		res -= 1
print(res)


t = int(input())
X = 0
for i in range(t):
	s = input()
	if s == 'X++':
		X = X + 1
	elif s == '++X':
		X = X + 1
	elif s == '--X':
		X = X - 1
	else:
		X = X - 1
print(X)


num = int(input())
i = 0
z = 0
while i < num:
	x = str(input())
	if x[0] == '+' or x[2] == '+':
		z += 1
	if x[0] == '-' or x[2] == '-':
		z -= 1
	i += 1
print(z)


x = 0

def bit(value):
	global x
	if '+' in value:
		x = x + 1
	elif '-' in value:
		x = x - 1
	return x
t = int(input())
for i in range(t):
	value = input()
	bit(value)
print(x)


n = int(input())
x = 0
nb = 0
while nb < n:
	ch = input()
	if ch == '++X' or ch == 'X++':
		x += 1
		nb = nb + 1
	elif ch == '--X' or ch == 'X--':
		x = x - 1
		nb = nb + 1
print(x)


n = input()
l = []
for i in range(int(n)):
	l.append(str(input()))
k = 0
for i in l:
	if i == 'X++':
		k += 1
	elif i == '++X':
		k += 1
	else:
		k -= 1
print(k)


num = 0
po = ['++X', 'X++']
ne = ['--X', 'X--']
n = int(input())
for i in range(0, n):
	st = input()
	if st in po:
		num = num + 1
	if st in ne:
		num = num - 1
print(num)


x = 0
for _ in range(int(input())):
	string = str(input())
	if string == '++X' or string == 'X++':
		x = x + 1
	elif string == '--X' or string == 'X--':
		x = x - 1
print(x)


n = int(input())
i = 0
ans = 0
while i < n:
	i = i + 1
	if input()[1] == '+':
		ans = ans + 1
	else:
		ans = ans - 1
print(ans)


lines = int(input())
operations = []
for line in range(lines):
	operation = input()
	operations.append(operation)
x = 0
for term in operations:
	if '+' in term:
		x += 1
	elif '-' in term:
		x -= 1
print(x)


num = int(input())
ans = 0
for i in range(num):
	s = input()
	if '+' in s:
		ans = ans + 1
	else:
		ans = ans - 1
print(ans)


n = int(input())
result = 0
for i in range(n):
	s = input()
	s = list(s)
	if s[0] == '+' or s[1] == '+':
		result = result + 1
	else:
		result = result - 1
print(result)


import sys
import math
x = sys.stdin.readlines()
val = 0
for y in range(1, int(x[0]) + 1):
	if '+' in x[y]:
		val += 1
	else:
		val -= 1
print(val)


it = int(input())
answer = 0
for i in range(it):
	s = input()
	if s[1] == '+':
		answer += 1
	else:
		answer -= 1
print(answer)


x = 0
kol = int(input())
for i in range(kol):
	per = input()
	if per.count('+') == 2:
		x += 1
	elif per.count('-') == 2:
		x -= 1
print(x)


number = 0
numberOfCommands = int(input())
for i in range(numberOfCommands):
	command = input()
	if '+' in command:
		number += 1
	else:
		number -= 1
print(number)


p = 0
for _ in range(int(input())):
	i = input()
	if i == '++X' or i == 'X++':
		p += 1
	else:
		p -= 1
print(p)


x = int(input())
count = 0
for i in range(x):
	j = input()
	if j[0] == '+' or j[2] == '+':
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
xin = 0
for i in range(n):
	astr = input()
	if '++' in astr:
		xin = xin + 1
	elif '--' in astr:
		xin = xin - 1
	else:
		continue
print(xin)


def main():
	n = int(input())
	sum = 0
	for i in range(n):
		st = input()
		st = st.replace('X', '')
		if st == '++':
			sum += 1
		else:
			sum -= 1
	print(sum)
main()


statements = int(input())
commands = [input() for n in range(statements)]
x = 0

def operate(c):
	if '++' in c:
		return 1
	if '--' in c:
		return -1
for c in commands:
	x += operate(c)
print(x)


n = int(input())
count = 0
plus = '++'
minus = '--'
for i in range(n):
	a = input()
	if plus in a:
		count += 1
	if minus in a:
		count -= 1
print(count)


def main():
	q = int(input())
	num = 0
	for i in range(q):
		s = input()
		if s[0] == '+' or s[1] == '+':
			num += 1
		else:
			num -= 1
	print(num)
main()


def check(x, op):
	if op[:2] == '++':
		x = x + 1
	elif op[:2] == '--':
		x = x - 1
	if op[1:] == '++':
		x = x + 1
	elif op[1:] == '--':
		x = x - 1
	return x
n = int(input())
x = 0
res = []
for i in range(n):
	op = input()
	x = check(x, op)
print(x)


x = 0
n = int(input())
ntimes = 0
while ntimes < n:
	statement = input()
	if statement == 'X++' or statement == '++X':
		x = x + 1
	if statement == '--X' or statement == 'X--':
		x = x - 1
	ntimes += 1
print(x)


a = 0
attempts = int(input())
for i in range(attempts):
	statment = input('').lower()
	if statment == '++x' or statment == 'x++':
		a = a + 1
	elif statment == '--x' or statment == 'x--':
		a = a - 1
	else:
		print('syntax error')
print(a)


input_s = int(input())
s = 0
for i in range(input_s):
	item_s = input()
	if item_s == '++X' or item_s == 'X++':
		s += 1
	elif item_s == '--X' or item_s == 'X--':
		s -= 1
print(s)


n = int(input())
val = 0
for i in range(n):
	op = input()
	if op[0] == '+' or op[1] == '+':
		val += 1
	else:
		val -= 1
print(val)


n = int(input())
X = 0
while n:
	t = input()
	if t[1] == '+':
		X += 1
	else:
		X -= 1
	n -= 1
print(X)


print(sum(('+' in input() or -1 for i in [0] * int(input()))))


n = int(input())
x = 0
for statements in range(n):
	operation = input()
	if operation.count('-') == 2:
		x -= 1
	else:
		x += 1
print(x)


import sys
from math import sqrt
input = lambda : sys.stdin.readline()

def Main():
	n = int(input())
	x = 0
	for i in range(n):
		op = input()
		if op.strip() == '++X' or op.strip() == 'X++':
			x = x + 1
		elif op.strip() == '--X' or op.strip() == 'X--':
			x = x - 1
	print(x)
Main()


import re
num_loops = int(input())
value = 0
n_list = []
for i in range(num_loops):
	line = input()
	line = re.sub('X', '', line)
	for j in range(len(line)):
		n_list.append(line[j])
	while len(n_list) > 0:
		if n_list[0] == n_list[1] == '+':
			value += 1
			del n_list[0:2]
		elif n_list[0] == n_list[1] == '-':
			value -= 1
			del n_list[0:2]
print(value)


ans = 0
for _ in range(int(input())):
	s = input()
	ans += s.count('++')
	ans -= s.count('--')
print(ans)


n = int(input())
plus = 0
minus = 0
for i in range(n):
	s = list(input())
	if s[1] == '+':
		plus += 1
	else:
		minus += 1
print(plus - minus)


i = int(input())
sum = 0
for j in range(i):
	s = input()
	if s == '++X' or s == 'X++':
		sum += 1
	else:
		sum -= 1
print(sum)


nl = int(input())
x = 0
for l in range(nl):
	operando = input()
	if '++' in operando:
		x += 1
	if '--' in operando:
		x -= 1
print(x)


def Bit():
	n = int(input(''))
	print('\n\n')
	x = 0
	for i in range(n):
		statement = input('')
		if '++' in statement:
			x += 1
		elif '--' in statement:
			x -= 1
	print(x)
Bit()


n = int(input())
i = 0
for _ in range(n):
	tmp = input()
	if tmp[1] == '+':
		i += 1
	else:
		i -= 1
print(i)


i = 0
j = int(input())
out = 0
while i < j:
	if '++' in input():
		out = out + 1
	else:
		out = out - 1
	i = i + 1
print(out)


num_of_opers = int(input())
x = 0
for i in range(0, num_of_opers):
	operation = str(input())
	if '++' in operation:
		x = x + 1
	else:
		x = x - 1
print(x)


number_of_lines = int(input())
x = 0.0
for i in range(number_of_lines):
	line = input()
	for letter in line:
		if letter == '+':
			x += 0.5
		if letter == '-':
			x -= 0.5
print(int(x))


statements = int(input())
x = 0
for statement in range(statements):
	operation = input()
	if operation.count('+') == 2:
		x += 1
	if operation.count('-') == 2:
		x -= 1
print(x)


def Bit(n, a):
	res = 0
	for i in range(n):
		if a[i] == 'X++' or a[i] == '++X':
			res = res + 1
		else:
			res = res - 1
	return res
n = int(input())
a = []
for i in range(n):
	x = input()
	a.append(x)
print(Bit(n, a))


n = int(input())
xValue = 0
for index in range(n):
	line1 = input()
	if line1.find('++') >= 0:
		xValue += 1
	elif line1.find('--') >= 0:
		xValue -= 1
print(xValue)


N = int(input())
x = 0
for n in range(N):
	statement = input()
	if statement in ('X++', '++X'):
		x += 1
	else:
		x -= 1
print(x)


num = int(input())
x = 0
opers = []
for i in range(num):
	opers.append(input())
for oper in opers:
	if oper[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


a = 0
for _ in range(int(input())):
	for c in input():
		if c == '+':
			a += 0.5
		elif c == '-':
			a -= 0.5
print(int(a))


from functools import reduce
import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def arr():
	return [int(i) for i in input().split()]

def sarr():
	return [int(i) for i in input()]

def inn():
	return int(input())
mo = 1000000007
n = inn()
x = 0
while n:
	n -= 1
	s = input()
	if s[0] == '+' or s[-1] == '+':
		x += 1
	else:
		x -= 1
print(x)


def execute_command(command, X):
	if command == '++X' or command == 'X++':
		X += 1
	elif command == '--X' or command == 'X--':
		X -= 1
	return X
num = int(input())
X = 0
for i in range(num):
	command = input()
	X = execute_command(command, X)
print(X)


import sys
x = 0
n = int(sys.stdin.readline())
for i in range(n):
	statement = sys.stdin.readline()
	if '+' in statement:
		x += 1
	else:
		x -= 1
sys.stdout.write(str(x))


n = int(input())
x = 0
for i in range(n):
	op = list(input())
	if op.count('+') == 2:
		x += 1
	else:
		x -= 1
print(x)


number_of_lines = int(input())
x = 0
for i in range(number_of_lines):
	operation = input().split('X')
	while '' in operation:
		operation.remove('')
	if operation[0] == '++':
		x += 1
	else:
		x -= 1
print(x)


import sys
import copy
from math import *
from collections import deque

def eprint(*args):
	print(*args, file=sys.stderr)
zz = not __debug__
if not zz:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output2.txt', 'w')
import bisect
k = int(input())
c = 0
for i in range(k):
	s = input().rstrip()
	if '+' in s:
		c += 1
	else:
		c -= 1
print(c)


operation = input()
counter = 0
for i in range(0, int(operation)):
	bit = input()
	if bit.lower() == 'x++' or bit.lower() == '++x':
		counter += 1
	else:
		counter -= 1
print(counter)


linesNum = int(input())
result = 0
for x in range(linesNum):
	operation = input()
	if '++' in operation:
		result += 1
	else:
		result -= 1
print(result)


n = int(input())
cnt = 0
for i in range(n):
	command = input()
	if command.find('++') != -1:
		cnt += 1
	elif command.find('--') != -1:
		cnt -= 1
print(cnt)


num = 0
tunrs = int(input())
for i in range(tunrs):
	operation = input()
	if '++' in operation:
		num += 1
	elif '--' in operation:
		num -= 1
print(num)


n = int(input())
x = 0
weirdflex = []
for i in range(0, n):
	seqs = input()
	weirdflex.append(seqs)
for i in weirdflex:
	if '++' in i:
		x = x + 1
	if '--' in i:
		x = x - 1
print(x)


j = 0
n = int(input())
if n == 1:
	sign = input()
	if sign == '++X' or sign == 'X++':
		j = j + 1
	if sign == 'X--' or sign == '--X':
		j = j - 1
if n > 1:
	for s in range(n):
		sign = input()
		if sign == '++X' or sign == 'X++':
			j = j + 1
		if sign == 'X--' or sign == '--X':
			j = j - 1
print(j)


n = int(input())
k = 0
for i in range(n):
	line = input()
	if line.count('++X') or line.count('X++'):
		k = k + 1
	else:
		k = k - 1
print(k)


n1 = input()
n = int(n1)
lst = list()
while n > 0:
	lst.append(input())
	n = n - 1
x = 0
for oper in lst:
	if '++' in oper:
		x = x + 1
	if '--' in oper:
		x = x - 1
print(x)


T = int(input())
x = 0
for i in range(T):
	st = input()
	if '-' in st:
		x -= 1
	elif '+' in st:
		x += 1
print(x)


def main():
	n = int(input())
	ans = 0
	for i in range(n):
		s = input()
		if '+' in s:
			ans += 1
		else:
			ans -= 1
	print(ans)
main()


n = int(input())
count = 0
for item in range(n):
	sample = input()
	if sample.count('+') >= 1:
		count += 1
	else:
		count -= 1
print(count)


t = int(input())
(count, count1) = (0, 0)
for i in range(t):
	s = input()
	if s == 'X++' or s == '++X':
		count += 1
	elif s == '--X' or s == 'X--':
		count1 -= 1
print(count + count1)


import sys

def main():
	inp = sys.stdin.readlines()
	result = 0
	for line in inp[1:]:
		if str(line).startswith('++'):
			result += 1
		elif str(line).startswith('--'):
			result -= 1
		if str(line).endswith('++\n'):
			result += 1
		elif str(line).endswith('--\n'):
			result -= 1
	print(result)
main()


n = int(input())
operations = ''
operations1 = []
cnt = 0
for i in range(n):
	operations = input()
	operations1.append(operations)
for j in range(n):
	if operations1[j] == 'X++' or operations1[j] == '++X':
		cnt += 1
	if operations1[j] == 'X--' or operations1[j] == '--X':
		cnt -= 1
print(cnt)


n = int(input())
op = []
for i in range(n):
	op.append(input())
sol = 0
for (i, s) in enumerate(op):
	i = 0
	while i <= len(s) - 2:
		if s[i] == '+' and s[i + 1] == '+':
			sol += 1
			i += 1
		if s[i] == '-' and s[i + 1] == '-':
			sol -= 1
			i += 1
		i += 1
print(sol)


n = int(input())
x = 0
for i in range(n):
	c = sorted(list(input()))
	if c[0] == '-':
		x -= 1
	elif c[0] == '+':
		x += 1
print(x)


from sys import stdin
s = stdin.read()
f = lambda x, r: len(x) - len(x.replace(r, ''))
print((f(s, '+') - f(s, '-')) // 2)


ans = 0
for i in range(int(input())):
	op = input()
	ans += 1 if op == '++X' or op == 'X++' else -1
print(str(ans))


from sys import stdin
inp = stdin
(ans, cases) = (0, int(inp.readline().strip()))
for c in range(cases):
	line = [x for x in inp.readline().strip()]
	line.sort()
	if line[0] == '-':
		ans -= 1
	else:
		ans += 1
print(ans)


n = int(input())
arr = []
for i in range(n):
	arr.append(input())
count = 0
for i in range(len(arr)):
	if arr[i][1] == '+':
		count += 1
	else:
		count -= 1
print(count)


nums = input().split(' ')
nums = int(nums[0])
sums = 0
for i in range(nums):
	strs = input().split(' ')
	if strs[0] == '++X' or strs[0] == 'X++':
		sums += 1
	elif strs[0] == '--X' or strs[0] == 'X--':
		sums -= 1
print(sums)


k = 0
n = int(input())
for i in range(n):
	o = input()
	o = o.replace('X', '')
	if o == '++':
		k = k + 1
	elif o == '--':
		k = k - 1
print(k)


import sys
amt = int(input())
num = 0
for x in range(amt):
	cmd = str(input())
	if cmd == 'X++' or cmd == '++X':
		num += 1
	elif cmd == 'X--' or cmd == '--X':
		num -= 1
print(num)


n = int(input())
x = 0
for i in range(n):
	a = input()
	for j in range(3):
		if a[j] == '+':
			x += 1
			break
		if a[j] == '-':
			x -= 1
			break
print(x)


a = int(input())
num = 0
for i in range(a):
	vari = input()
	if '--' in vari:
		num = num - 1
	if '++' in vari:
		num = num + 1
print(num)


N = input()
List = []
for i in range(int(N)):
	List.append(input())
X = 0
for y in List:
	if '+' in y:
		X += 1
	else:
		X -= 1
print(X)


value = 0
n = int(input())
while n > 0:
	req = input()
	if req == '++X' or req == '++x' or req == 'X++' or (req == 'x++'):
		value = value + 1
	elif req == '--X' or req == '--x' or req == 'X--' or (req == 'x--'):
		value = value - 1
	else:
		value = value
	n -= 1
print(value)


lines = int(input())
X = 0
for _ in range(lines):
	statement = input()
	X += 1 if statement[1] == '+' else -1
print(X)


sm = []
schet = 0
for i in range(int(input())):
	sm.append(input())
for j in sm:
	if '++' in j:
		schet += 1
	elif '--' in j:
		schet -= 1
print(schet)


n = int(input())
x = 0
count = 0
while count < n:
	entry = input()
	count = count + 1
	k = 0
	while k < len(entry):
		element = entry[k]
		if element == '+':
			x = x + 1
			break
		elif element == '-':
			x = x - 1
			break
		k = k + 1
print(x)


num = int(input())
count = 0
for i in range(num):
	command = input()
	if command[1] == '+':
		count += 1
	else:
		count -= 1
print(count)


n = int(input().strip())
plus = {'++X', 'X++'}
sum = 0
for _ in range(n):
	if input().strip() in plus:
		sum += 1
	else:
		sum -= 1
print(sum)


n = int(input())
numbers = []
for i in range(n):
	number = input()
	numbers.append(number)
a = numbers.count('--X')
b = numbers.count('X--')
c = numbers.count('X++')
d = numbers.count('++X')
finally_number = +c + d - a - b
print(finally_number)


N = int(input())
Res = 0
for i in range(N):
	L = input()
	if L[1] == '+':
		Res += 1
	else:
		Res -= 1
print(str(Res))


n = int(input())
c1 = 0
c2 = 0
l = []
for i in range(n):
	a = input()
	l.append(a)
for i in l:
	if '++' in i:
		c1 += 1
for i in l:
	if '--' in i:
		c2 = c2 - 1
print(c1 + c2)


n = int(input())
li = []
for _ in range(n):
	li.append(input().replace('X', ''))
p = li.count('++')
m = li.count('--')
print(p - m)


no_statements = int(input())
i = 0
count = 0
while i < no_statements:
	my_input = input()
	if '+' in my_input:
		count += 1
	if '-' in my_input:
		count -= 1
	i += 1
print(count)


n = int(input())
x = 0
for i in range(n):
	fig = input()
	y = fig.find('+')
	if y >= 0:
		x += 1
	else:
		x += y
print(x)


n = int(input())
x = 0
c_p = 0
c_m = 0
for i in range(n):
	X = input()
	for i in X:
		if i == '+':
			c_p += 1
		elif i == '-':
			c_m += 1
c_p = int(c_p / 2)
c_m = int(c_m / 2)
for i in range(c_p):
	x += 1
for i in range(c_m):
	x -= 1
print(x)


n = int(input())
t = []
for i in range(n):
	t.append(input())
x = 0
for i in t:
	if i == '++X' or i == 'X++':
		x += 1
	if i == '--X' or i == 'X--':
		x -= 1
print(x)


x = 0
add = False
t = int(input())
for t in range(t):
	n = str(input())
	for letter in n:
		if letter == '+':
			add = True
		elif letter == '-':
			add = False
	if add == True:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for m in range(0, n, 1):
	y = str(input())
	if y == '++X' or y == 'X++':
		x += 1
	else:
		x -= 1
print(x)


(n, X) = (input(), 0)
for t in range(int(n)):
	X += [-1, 1][input()[1] == '+']
print(X)


val = 0
for tt in range(int(input())):
	s = input()
	if '+' in s:
		val += 1
	else:
		val -= 1
print(val)


x = 0
n = int(input())

def plus():
	if statement[0] == '+' or statement[1] == '+' or statement[2] == '+':
		return True
	else:
		return False
for i in range(0, n):
	statement = input()
	if plus():
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for _ in range(n):
	op = input()
	for o in op:
		if o == '-':
			x -= 1
			break
		elif o == '+':
			x += 1
			break
print(x)


x = int(input())
z = ['++X', '--X', 'X++', 'X--']
zx = 0
for x1 in range(x):
	y = str(input())
	if y == z[0] or y == z[2]:
		zx += 1
	if y == z[1] or y == z[3]:
		zx -= 1
print(zx)


(a, b) = (0, 0)
for i in int(input()) * ' ':
	t = input()
	if '++' in t:
		a += 1
	elif '--' in t:
		b += 1
print(a - b)


a = int(input())
x = 0
for i in range(a):
	s = input()
	if s.__contains__('+'):
		x = x + 1
	else:
		x = x - 1
print(x)


x = int(input())
v = 0
for _ in range(x):
	y = input()
	if y[0] == '+':
		v += 1
	elif y[0] == '-':
		v -= 1
	elif y[len(y) - 1] == '+':
		v += 1
	elif y[len(y) - 1] == '-':
		v -= 1
print(v)


x = 0
n = int(input())
for op in range(n):
	inp = input()
	if '++' in inp:
		x += 1
	else:
		x += -1
print(x)


ans = 0
for f in range(int(input())):
	if input().find('++') != -1:
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
x = 0
i = 1
while i <= n:
	operation = input().replace('X', '')
	if operation == '++':
		x = x + 1
	elif operation == '--':
		x = x - 1
	i = i + 1
print(x)


initial = int(input())
x = 0
for i in range(initial):
	temp = input()
	if '++' in temp:
		x += 1
	elif '--' in temp:
		x -= 1
print(x)


n = int(input())
inputs = []
for _ in range(n):
	inputs.append(input())
res = 0
for s in inputs:
	if '++' in s:
		res += 1
	else:
		res -= 1
print(res)


import sys

def solution():
	T = int(input())
	result = 0
	for _ in range(T):
		line = input()
		if '+' in line:
			result += 1
		else:
			result -= 1
	print(result)
solution()


import sys

def solve(input):
	x = 0
	x1 = input[:2]
	x2 = input[1:]
	if ''.join(x1) == '++' or ''.join(x2) == '++':
		x += 1
	elif ''.join(x1) == '--' or ''.join(x2) == '--':
		x -= 1
	return x
count = 0
n = sys.stdin.readline()
s = sys.stdin.read()
s = s.split('\n')
n = n.split(' ')
for x in range(int(n[0])):
	count += solve(s[x])
print(count)


(sentences, x) = ([], 0)
for i in range(int(input())):
	sentences.append(input())
for sentence in sentences:
	if '+' in list(sentence):
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
answer = 0
while n > 0:
	inputStr = input()
	if inputStr[1] == '+':
		answer += 1
	else:
		answer -= 1
	n -= 1
print(answer)


t = int(input())
temp = 0
int(temp)
for i in range(t):
	s = input()
	if s[0] == '+':
		temp += 1
	elif s[0] == '-':
		temp -= 1
	elif s[2] == '+':
		temp += 1
	elif s[2] == '-':
		temp -= 1
print(temp)


n = int(input())
x = 0
for item in range(1, n + 1):
	st = input()
	if st == '--X' or st == 'X--':
		x -= 1
	elif st == 'X++' or st == '++X':
		x += 1
print(x)


t = int(input())
count = 0
for i in range(t):
	n = list(input())
	if n[1] == '+':
		count += 1
	else:
		count -= 1
print(count)


try:
	n = int(input())
	X = 0
	for _ in range(n):
		a = input()
		if '+' in a:
			X = X + 1
		else:
			X = X - 1
	print(X)
except:
	pass


x = 0
t = int(input())
for _ in range(t):
	l = input()
	if l[0] == '+':
		x += 1
	elif l[0] == '-':
		x -= 1
	elif l[1] == '+':
		x += 1
	elif l[1] == '-':
		x -= 1
	else:
		x = x + 0
print(x)


import sys
list = []
for line in sys.stdin:
	tempstr = line.split()
	list.extend(tempstr)
list.pop(0)
X = 0
for i in list:
	if i == '++X':
		X = X + 1
	elif i == 'X++':
		X = X + 1
	elif i == '--X':
		X = X - 1
	elif i == 'X--':
		X = X - 1
print(X)


o = eval(input())
x = 0
entry = []
for e in range(o):
	entry.append(input())
	if entry[e].count('+') == 2 and entry[e].count('X') == 1:
		x += 1
	if entry[e].count('-') == 2 and entry[e].count('X') == 1:
		x -= 1
print(x)


x = 0
n = int(input())
for _ in range(n):
	op = input().split('X')
	for el in op:
		if el == '++':
			x += 1
		elif el == '--':
			x -= 1
print(x)


n = int(input())
x = 0
lst = []
for i in range(0, n):
	name = input()
	lst.append(name)
for i in lst:
	if i[1] == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


def input_multiple_lines(number_of_lines):
	return [input() for _ in range(number_of_lines)]
n = int(input())
a = input_multiple_lines(n)
x = 0
for i in a:
	if i == 'X++' or i == '++X':
		x = x + 1
	elif i == 'X--' or i == '--X':
		x = x - 1
	else:
		pass
print(x)


r = 0
for _ in range(int(input())):
	r += 1 if input().replace('X', '') == '++' else -1
print(r)


def is_adding(x, y):
	if x == '++X' or x == 'X++':
		y += 1
	elif x == '--X' or x == 'X--':
		y -= 1
	return y
m = int(input())
y = 0
for r in range(m):
	x = input()
	y = is_adding(x, y)
print(y)


n = int(input())
res = 0
for i in range(n):
	s1 = input()
	if s1 == 'X++':
		res += 1
	elif s1 == '++X':
		res += 1
	else:
		res -= 1
print(res)


n = int(input())
statements = []
X = 0
for value in range(1, n + 1):
	statements.append(input())
for statement in statements:
	plus_operations = 0
	minus_operations = 0
	for value in range(0, 3):
		if statement[value] == '+':
			plus_operations = plus_operations + 1
		elif statement[value] == '-':
			minus_operations = minus_operations + 1
	if plus_operations == 2:
		X = X + 1
	elif minus_operations == 2:
		X = X - 1
print(X)


cnt = int(input())
x = 0
for i in range(cnt):
	dt = input()
	if '-' in dt:
		x -= 1
	elif '+' in dt:
		x += 1
print(x)


t = int(input())
countA = 0
countB = 0
for j in range(t):
	s = input()
	for i in s:
		if i == '+':
			countA += 1
		elif i == '-':
			countB += 1
print(countA // 2 - countB // 2)


def bitland(est):
	if est.count('++') > 0:
		return 1
	else:
		return -1
count = 0
n = int(input())
for i in range(n):
	est = input()
	count = count + bitland(est)
print(count)


n = int(input())
bank = list()
result = 0
for i in range(n):
	b = input()
	bank.append(b)
for w in bank:
	if '++' in w:
		result += 1
	if '--' in w:
		result -= 1
print(result)


n = int(input())
operations = []
for i in range(n):
	operations.append(input().replace('X', ''))
x = 0
for i in operations:
	if i == '++':
		x += 1
	elif i == '--':
		x -= 1
print(x)


n = int(input())
g = 0
for _ in range(n):
	string = input()
	if '+' in string:
		g += 1
	elif '-' in string:
		g -= 1
print(g)


n = int(input())
x = 0
for m in range(n):
	text = str(input())
	if text[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


x = 0
n = input()
num = int(n)
i = 0
while i < num:
	z = input()
	if z[1] == '+':
		x = x + 1
	elif z[1] == '-':
		x = x - 1
	i = i + 1
print(x)


n = int(input())
x = 0
for i in range(n):
	str_a = input().strip('X')
	if '++' in str_a:
		x += 1
	if '--' in str_a:
		x -= 1
print(x)


n = int(input())
x = 0
for i in range(n):
	cmd = input().split('X')
	for i in cmd:
		if i == '++':
			x += 1
		elif i == '--':
			x -= 1
print(x)


x = int(input())
X = 0
i = 1
l = []
while i <= x:
	y = input()
	l.append(y)
	i += 1
for i in l:
	if i == '++X' or i == 'X++':
		X += 1
	elif i == '--X' or i == 'X--':
		X -= 1
print(X)


n = int(input())
num = 0
for i in range(n):
	s = input().split('X')
	if '++' in s:
		num += 1
	elif '--' in s:
		num -= 1
print(num)


iCount = int(input())
result = 0
inst = ''
for i in range(iCount):
	inst = input()
	if inst in ('++X', 'X++'):
		result += 1
	if inst in ('X--', '--X'):
		result -= 1
print(result)


a = int(input())
c = 0
for _ in range(a):
	b = input()
	for i in b:
		if i == '+':
			c = c + 0.5
		if i == '-':
			c = c - 0.5
print(int(c))


__author__ = 'Walnut'
import math
n = int(input())
x = int(0)
for i in range(n):
	s = str(input())
	if s == '++X' or s == 'X++':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for t in range(n):
	s = input()
	if '++' in s:
		x += 1
	if '--' in s:
		x -= 1
print(x)


n = int(input())
x = 0
while n > 0:
	l = str(input())
	n = n - 1
	if l.find('++') != -1:
		x = x + 1
	elif l.find('--') != -1:
		x = x - 1
print(x)


C = ['X']
N = int(input())
X = 0
for x in range(N):
	S = ''.join([x for x in list(input()) if not x in C])
	if S == '++':
		X = X + 1
	else:
		X = X - 1
print(X)


n = int(input())
whole = []
for i in range(n):
	arr = input()
	whole.append(arr)
x = 0
for i in whole:
	for j in i:
		if j == '+':
			x = x + 1
			break
		elif j == '-':
			x = x - 1
			break
print(x)


def getResult(n):
	result = 0
	for i in range(n):
		str = input()
		if '++' in str:
			result = result + 1
		else:
			result = result - 1
	return result
n = int(input())
result = getResult(n)
print(result)


str1 = '++X'
str2 = 'X++'
str3 = 'X--'
str4 = '--X'
n = int(input())
c = 0
if 1 <= n <= 150:
	for i in range(n):
		strs = input()
		if strs == str1 or strs == str2:
			c = c + 1
		elif strs == str3 or strs == str4:
			c = c - 1
	print(c)


def main(text):
	value = 0
	for i in range(0, text):
		operation = input()
		if '+' in operation:
			value += 1
		else:
			value -= 1
	print(value)
text = int(input())
main(text)


class Bit:

	@staticmethod
	def solve(num_of_statements):
		value = 0
		for _ in range(0, num_of_statements):
			statement = input()
			if '++' in statement:
				value += 1
			elif '--' in statement:
				value -= 1
		return value

def main():
	num_of_statements = int(input())
	b = Bit()
	print(b.solve(num_of_statements))
main()


X = 0
n = int(input())
for i in range(0, n):
	string = str(input())
	if string == 'X++':
		X = X + 1
	elif string == 'X--':
		X = X - 1
	elif string == '++X':
		X1 = X + 1
		X = X1
	elif string == '--X':
		X1 = X - 1
		X = X1
	else:
		pass
print(X)


n = int(input())
x = 0
for i in range(n):
	c = input()
	d = list(c)
	if d[1] == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


n = int(input())
l = []
c = 0
for i in range(0, n):
	m = input()
	l.append(m)
for j in range(len(l)):
	for k in range(0, 3):
		if l[j][k] == '+':
			c = c + 1
			break
		elif l[j][k] == '-':
			c = c - 1
			break
print(c)


n = int(input())
x = 0
c2 = '+'
c3 = '-'
for i in range(n):
	t = input()
	if c2 in t:
		x = x + 1
	else:
		x = x - 1
print(x)


p = int(input())
c = 0
for i in range(p):
	n = input()
	if n.count('++'):
		c += 1
	elif n.count('--'):
		c -= 1
print(c)


n = int(input())
x = 0
for index in range(0, n):
	str = input()
	if str == '++X' or str == 'X++':
		x += 1
	if str == '--X' or str == 'X--':
		x -= 1
print(x)


testcase = int(input())
x = 0
while testcase > 0:
	s = input().replace('X', '')
	if s == '++':
		x += 1
	elif s == '--':
		x -= 1
	testcase -= 1
print(x)


m = int(input())
c = 0
while m:
	y = input()
	y = list(y)
	if '+' in y:
		c += 1
	else:
		c -= 1
	m -= 1
print(c)


n = int(input())
it = (input() for _ in range(n))
sum = 0
for val in it:
	if '+' in val:
		sum += 1
		continue
	if '-' in val:
		sum -= 1
print(sum)


operations = int(input())
sum = 0
for i in range(operations):
	op = input()
	if '++' in op:
		sum += 1
	else:
		sum -= 1
print(sum)


b = int(input())
x = 0
for i in range(b):
	f = input()
	if f[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


number = int(input())
x = 0
for i in range(0, number):
	statement = input()
	if statement == '++X' or statement == 'X++':
		x += 1
	elif statement == '--X' or statement == 'X--':
		x -= 1
print(x)


import sys
x = 0
num_of_ops = 0
for line in sys.stdin:
	if num_of_ops == 0:
		num_of_ops = int(str(line).strip())
		continue
	if '++' in line:
		x += 1
	if '--' in line:
		x -= 1
	num_of_ops -= 1
	if num_of_ops == 0:
		break
print(x)


n = int(input(''))
list1 = []
count = 0
for i in range(n):
	m = input('')
	list1.append(m)
for j in list1:
	if j == '++X' or j == 'X++':
		count = count + 1
	elif j == '--X' or j == 'X--':
		count = count - 1
print(count)


def defineX():
	listOfVariable = []
	numOfVariables = int(input())
	for i in range(numOfVariables):
		operation = input()
		processOperation(listOfVariable, operation)
	totalCounter = sum(listOfVariable)
	print(totalCounter)

def processOperation(listOfVariables, operation):
	counter = 0
	if operation[1] == '+':
		counter += 1
	elif operation[1] == '-':
		counter -= 1
	listOfVariables.append(counter)

def printToConsole(totalCounter):
	print(totalCounter)
defineX()


y = 0
x = 0
while y == 0:
	obtnNum = int(input())
	if obtnNum > 0 and obtnNum <= 150:
		y = 1
	else:
		y = 0
for i in range(obtnNum):
	getBit = input().lower()
	if getBit == 'x++' or getBit == '++x':
		x = x + 1
	elif getBit == 'x--' or getBit == '--x':
		x = x - 1
print(x)


x = 0
testCase = int(input())
for i in range(testCase):
	ops = input()
	if ops[0] == '+' or ops[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


X = 0
n = int(input())
for i in range(n):
	prog = input()
	if prog.count('++') > 0:
		X += 1
	else:
		X -= 1
print(X)


n = int(input())
c = 0
while n > 0:
	a = input()
	if a[1] == '+':
		c += 1
	elif a[1] == '-':
		c = c - 1
	n = n - 1
print(c)


value = 0
for i in range(0, int(input())):
	operation = input()
	if operation in ['X++', '++X']:
		value += 1
	else:
		value -= 1
print(value)


n = int(input())
z = 0
for i in range(n):
	op = input().lower()
	if op == '--x' or op == 'x--':
		z = z - 1
	elif op == '++x' or op == 'x++':
		z = z + 1
print(z)


result = 0
for _ in range(int(input())):
	operation = input()
	if operation == '++X' or operation == 'X++':
		result += 1
	else:
		result -= 1
print(result)


(n, ans) = (int(input()), 0)
for i in range(n):
	ans += [-1, 1]['++' in input()]
print(ans)


t = int(input())
X = []
n = 0
for j in range(t):
	X.append(input())
for i in X:
	if i == 'X++':
		n = n + 1
	elif i == '++X':
		n = n + 1
	elif i == 'X--':
		n = n - 1
	elif i == '--X':
		n = n - 1
print(n)


var = 0
n = int(input())
for i in range(n):
	code = input()
	if code in ['X++', '++X']:
		var += 1
	else:
		var -= 1
print(var)


commandCount = int(input())
valueX = 0
for i in range(commandCount):
	command = input()
	if '++' in command:
		valueX += 1
	if '--' in command:
		valueX -= 1
print(valueX)


cont = 0
for _ in range(int(input())):
	if input()[1] == '+':
		cont += 1
	else:
		cont -= 1
print(cont)


n = int(input())
array = []
x = 0
for i in range(n):
	array.append(input())
for r in array:
	if r == 'X++':
		x += 1
	elif r == '++X':
		x += 1
	else:
		x -= 1
print(x)


x = 0
ans = 0
n = int(input())
while n > 0:
	s = input()
	if s[0] == '+':
		x = x + 1
	if s[2] == '+':
		x = x + 1
	if s[0] == '-':
		x = x - 1
	if s[2] == '-':
		x = x - 1
	n = n - 1
print(x)


summ = 0
for x in range(int(input())):
	if '+' in input():
		summ = summ + 1
	else:
		summ = summ - 1
print(summ)


def fun(N):
	result = 0
	for i in N:
		if '+' in i:
			result += 1
		if '-' in i:
			result -= 1
	return result
n = int(input())
N = list()
for i in range(n):
	s = input()
	N.append(s)
print(fun(N))


def sol(exp, x):
	if exp[0] == '+' and exp[1] == '+' or (exp[1] == '+' and exp[2] == '+'):
		x = x + 1
	else:
		x = x - 1
	return x
x = 0
inp = int(input())
for i in range(inp):
	exp = input()
	x = sol(exp, x)
print(x)


x = 0
for _ in range(int(input())):
	x += [-1, 1][bool('+' in input())]
print(x)


n = int(input())
x = 0
com = []
for i in range(n):
	command = str(input())
	com.append(command.lower())
for i in range(len(com)):
	if com[i] == '++x' or com[i] == 'x++':
		x += 1
	elif com[i] == '--x' or com[i] == 'x--':
		x -= 1
print(x)


num = int(input())
ans = 0
for i in range(num):
	line = list(input())
	if line[1] == '-':
		ans -= 1
	else:
		ans += 1
print(str(ans))


t = int(input())
x = 0
while t > 0:
	t = t - 1
	s = input()
	if s[0] == '+' and s[1] == '+':
		x = x + 1
	elif s[1] == '+' and s[2] == '+':
		x = x + 1
	elif s[1] == '-' and s[2] == '-':
		x = x - 1
	elif s[0] == '-' and s[1] == '-':
		x = x - 1
print(x)


n = int(input())
show = 0
i = 0
j = 0
lst = []
for i in range(n):
	a = str(input())
	if a[1] == '+':
		show = show + 1
	elif a[1] == '-':
		show = show - 1
print('{}'.format(show))


number = int(input())
counter = 0
for i in range(number):
	x = input()
	if x[1] == '+':
		counter += 1
	else:
		counter -= 1
print(counter)


n = int(input())
r = 0
for x in range(n):
	l = list(input())
	for x in l:
		if x == '-':
			r -= 0.5
		elif x == '+':
			r += 0.5
print(int(r))


res = 0
N = int(input())
for i in range(N):
	txt = input()
	if '++' in txt:
		res += 1
	else:
		res -= 1
print(res)


p = 0
m = 0
t = int(input())
while t > 0:
	s = input()
	if '+' in s:
		p += 1
	elif '-' in s:
		m += 1
	t -= 1
print(p - m)


num_lines = int(input())
x = 0
for i in range(num_lines):
	op = input()
	if op == '++X' or op == 'X++':
		x += 1
	elif op == '--X' or op == 'X--':
		x -= 1
	else:
		x = x
print(x)


def main():
	cur_value = 0
	num_operations = int(input())
	for _ in range(num_operations):
		operation = input()
		if operation[1] == '+':
			cur_value += 1
		else:
			cur_value -= 1
	print(cur_value)
main()


cases = int(input())
h = 'X++'
d = '++X'
k = 'X--'
l = '--X'
x = 0
for j in range(0, cases):
	y = input()
	if y == h:
		x = x + 1
	elif y == d:
		x = x + 1
	elif y == k:
		x = x - 1
	elif y == l:
		x = x - 1
print(x)


t = int(input())
x = 0
for i in range(t):
	a = [x for x in input()]
	a.remove('X')
	s = ''
	for i in a:
		s += i
	if s == '++':
		x += 1
	elif s == '--':
		x -= 1
print(x)


x = 0
n = int(input())
for i in range(n):
	statement = input()
	for char in statement:
		if char == '+':
			x += 1
			break
		elif char == '-':
			x -= 1
			break
print(x)


n = int(input())
acdc = 0
for i in range(n):
	string = input()
	if string.find('++') != -1:
		acdc = acdc + 1
	elif string.find('--') != -1:
		acdc = acdc - 1
print(acdc)


a = int(input())
outcome = 0
for i in range(a):
	char = input()
	if char[1] == '+':
		outcome += 1
	else:
		outcome -= 1
print(outcome)


number = int(input())
result = 0
i = 0
while i < number:
	x = input().lower()
	if x == 'x++' or x == '++x':
		result += 1
	else:
		result -= 1
	i += 1
print(result)


x = int(input())
y = 0
while x:
	string = input()
	if '++X' == string or 'X++' == string:
		y += 1
	else:
		y -= 1
	x -= 1
print(y)
exit()


import sys
n = int(input())
q = i = 0
while i < n:
	s = input()
	if s == '++X' or s == 'X++':
		q += 1
	else:
		q -= 1
	i += 1
print(q)


count = 0
for i in range(int(input())):
	bit_string = input()
	if bit_string.strip('X') == '++':
		count += 1
	else:
		count -= 1
print(count)


flag = sum = 0
limit = int(input().strip())
while flag < limit:
	v = input().strip()
	if v == '--X' or v == 'X--':
		sum -= 1
	elif v == '++X' or v == 'X++':
		sum += 1
	else:
		break
	flag += 1
else:
	print(str(sum))


n = int(input())
c1 = c2 = 0
for i in range(1, n + 1):
	s = str(input())
	if s[1] == '+':
		c1 += 1
	else:
		c2 += 1
print(c1 - c2)


x = 0
n = int(input())
statements = []
for i in range(0, n):
	statements.append(input())
for s in statements:
	if '++' in s:
		x += 1
	elif '--' in s:
		x -= 1
print(x)


no_statements = int(input())
initial = 0
for _ in range(no_statements):
	st = input()
	if st[0] == '+' or st[int(len(st) - 1)] == '+':
		initial += 1
	else:
		initial -= 1
print(initial)


n = eval(input())
y = [0] * n
c = 0
i = len(y)
x = 0
while c < i:
	y[c] = input()
	c += 1
c = 0
while c < i:
	if y[c] == '++X' or y[c] == 'X++':
		x = x + 1
	if y[c] == '--X' or y[c] == 'X--':
		x = x - 1
	c += 1
print(x)


n = int(input())
x = 0
for _ in range(n):
	a = input()
	if a.find('++') == -1:
		x -= 1
	else:
		x += 1
print(x)


n = int(input())
counter = 's' * n
outp = 0
for i in counter:
	temp = input()
	if '+' in temp:
		outp += 1
	elif '-' in temp:
		outp -= 1
print(outp)


statement_nums = int(input())
result = 0
while statement_nums > 0:
	operation = input()
	if operation == 'X++' or operation == '++X':
		result += 1
	elif operation == 'X--' or operation == '--X':
		result -= 1
	statement_nums -= 1
print(result)


n = input()
n = int(n)
x = 0
while n != 0:
	statement = list(input())
	if '+' in statement:
		x = x + 1
	elif '-' in statement:
		x = x - 1
	n -= 1
print(x)


n = eval(input())
X = 0
for i in range(n):
	x = input()
	if x == 'X++' or x == '++X':
		x = 1
	else:
		x = -1
	X += x
print(X)


N = int(input())
x = 0
for i in range(N):
	ops = list(input())
	if ops[0] == '-' or ops[2] == '-':
		x -= 1
	else:
		x += 1
print(x)


t = int(input())
x = 0
for i in range(t):
	s = list(str(input()))
	if '+' in s:
		x += 1
	elif '-' in s:
		x -= 1
print(x)


import re

def cal(L):
	if re.search('\\+\\+', L):
		return 1
	else:
		return -1
cnt = int(input())
L = []
result = 0
for i in range(0, cnt):
	L.append(input())
	result += cal(L[i])
print(result)


n = int(input())
z = 0
for i in range(n):
	s = str(input())
	if s.find('+') >= 0:
		z = z + 1
	else:
		z = z - 1
print(z)


n = int(input())
tambah = 0
kurang = 0
for i in range(n):
	z = str(input())
	for i in range(len(z)):
		if z[i] == '+':
			tambah += 1
		elif z[i] == '-':
			kurang -= 1
tambah //= 2
kurang //= 2
print(tambah + kurang)


from sys import stdin
num = int(input())
count = 0
for _ in range(num):
	x = input()
	if x == 'X++' or x == '++X' or x == '+X+':
		count += 1
	else:
		count -= 1
print(count)


from math import *
sInt = lambda : int(input())
mInt = lambda : map(int, input().split())
lInt = lambda : list(map(int, input().split()))
n = sInt()
exec = 0
for i in range(n):
	s = input()
	if s == '++X' or s == 'X++':
		exec += 1
	else:
		exec -= 1
print(exec)


n = int(input())
a = []
for i in range(n):
	a.append(input())
k = 0
for i in range(n):
	if a[i] == '++X' or a[i] == '+X+' or a[i] == 'X++':
		k += 1
	if a[i] == '--X' or a[i] == '-X-' or a[i] == 'X--':
		k -= 1
print(k)


n = int(input())
o = 0
for i in range(0, n):
	s = input().rstrip()
	x = list(s)
	if x[0] == '-':
		o -= 1
	if x[0] == '+':
		o += 1
	if x[len(x) - 1] == '-':
		o -= 1
	if x[len(x) - 1] == '+':
		o += 1
print(o)


import sys

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def rinput():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
n = iinput()
a = []
for i in range(n):
	a.append(input())
count = 0
for i in range(len(a)):
	if a[i] == '++X' or a[i] == 'X++':
		count += 1
	elif a[i] == 'X--' or a[i] == '--X':
		count -= 1
print(count)


nStr = input()
n = int(nStr)
i = 0
ans = 0
while i < n:
	statementLine = input()
	if statementLine[1] == '+':
		ans = ans + 1
	else:
		ans = ans - 1
	i = i + 1
print(ans)


n = int(input())
count = 0
a = []
for i in range(0, n):
	new = str(input())
	a.append(new)
for i in range(0, n):
	if a[i] == 'X++':
		count = count + 1
	elif a[i] == '++X':
		count = count + 1
	else:
		count = count - 1
print(count)


n = int(input())
s = 0
while n > 0:
	n = n - 1
	que = input()
	r = que[1]
	if r == '+':
		s = s + 1
	else:
		s = s - 1
print(s)


from sys import stdin, stdout

def read_int_input():
	return map(int, stdin.readline().rstrip().split())

def read_str_input():
	return stdin.readline().rstrip().split()

def write_output(result):
	return stdout.write(str(result) + '\n')

def main():
	(n,) = read_int_input()
	x = 0
	for _ in range(n):
		(statement,) = read_str_input()
		if '++' in statement:
			x += 1
		elif '--' in statement:
			x -= 1
	write_output(result=x)
main()


count = int(input())
x = 0
for _ in range(count):
	statement = input()
	if statement == 'X++' or statement == '++X':
		x += 1
	else:
		x -= 1
print(x)


from sys import stdin

def main(array):
	del array[0]
	result = 0
	targetPositive = ['X++', '++X']
	targetNegative = ['X--', '--X']
	for item in array:
		if item in targetPositive:
			result += 1
		elif item in targetNegative:
			result -= 1
	return result
data = stdin.readlines()
index = 0
for item in data:
	data[index] = item.replace('\n', '')
	index += 1
print(main(data))


n = int(input())
X = 0
if n >= 1 and n <= 150:
	for i in range(n):
		stat = input()
		if '++' in stat:
			X += 1
		elif '--' in stat:
			X -= 1
print(X)


import math
import sys
import string

def ri():
	return input()

def ii():
	return int(input())

def li():
	return input().split()

def mi():
	return list(map(int, input().split()))
n = ii()
x = 0
for i in range(n):
	s = ri()
	if s[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


N = int(input())
Ans = 0
for wi in range(1, N + 1):
	Str = input()
	if '+' in Str:
		Ans = Ans + 1
	else:
		Ans = Ans - 1
print(Ans)


x = 0
number_of_operations = int(input())
for i in range(number_of_operations):
	string = input()
	if '++' in string:
		x += 1
	elif '--' in string:
		x -= 1
print(x)


line1 = int(input())
s = 0
for i in range(line1):
	z = input()
	if '++' in z:
		s = s + 1
	if '--' in z:
		s = s - 1
print(s)


r = 0
for n in range(int(input())):
	if '++' in input():
		r = r + 1
	else:
		r = r - 1
print(r, end='')


n = int(input())
x = 0
for _ in range(n):
	operator = input().strip('X')
	if operator == '++':
		x += 1
	if operator == '--':
		x -= 1
print(x)


def main():
	n = int(input())
	val = 0
	for i in range(n):
		s = input()
		if '++' in s:
			val += 1
		elif '--' in s:
			val -= 1
	print(val)
main()


print(sum(list((1 if '++' in input() else -1 for i in range(int(input()))))))


t = input()
t = int(t)
x = 0
while t:
	t = t - 1
	a = input()
	a = a.split('X')
	del a[a.index('')]
	if a[0] == '++':
		x = x + 1
	else:
		x = x - 1
print(x)


n_lines = int(input())
count_x = 0
while n_lines:
	n_lines -= 1
	newline = input()
	if '++' in newline:
		count_x += 1
	else:
		count_x -= 1
print(count_x)


result = 0
iteration = int(input())
while iteration > 0:
	str = input()
	if str.find('++') != -1:
		result += 1
	elif str.find('--') != -1:
		result -= 1
	iteration -= 1
print(result)


n = int(input())
p = []
for i in range(n):
	p.append(str(input()))
s = len(p)
x = 0
for j in range(s):
	if p[j] in {'++X', 'X++'}:
		x += 1
	else:
		x -= 1
print(x)


import math
c = 0
for i in range(int(input())):
	s = input()
	if s == '++X' or s == 'X++':
		c += 1
	elif s == '--X' or s == 'X--':
		c -= 1
print(c)


size = int(input())
operations = [input() for _ in range(size)]
value = 0
for operation in operations:
	if '++' in operation:
		value += 1
	elif '--' in operation:
		value -= 1
print(value)


import sys
n = int(sys.stdin.readline().strip())
count = 0
for i in range(n):
	c = sys.stdin.readline().strip()
	if c == '++X' or c == 'X++':
		count += 1
	elif c == '--X' or c == 'X--':
		count -= 1
print(count)


x = 0
for u in range(int(input())):
	if input().count('+') == 2:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
stmts = [input() for i in range(n)]
val = 0
for stmt in stmts:
	if stmt[1] == '+':
		val += 1
	else:
		val -= 1
print(val)


def ans(n):
	x = 0
	O1 = 'X++'
	O2 = '++X'
	O3 = 'X--'
	O4 = '--X'
	if n == O1 or n == O2:
		x += 1
	elif n == O3 or n == O4:
		x -= 1
	return x
n = int(input())
s = 0
for _ in range(n):
	t = input()
	s = s + ans(t)
print(s)


import sys
N = int(input())
x = 0
for i in range(N):
	line = input()
	if line[0] == '+' or line[-1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
A = []
x = 0
for i in range(n):
	A.append(input())
for b in range(n):
	if A[b] == '++X' or A[b] == 'X++':
		x += 1
	elif A[b] == '--X' or A[b] == 'X--':
		x -= 1
print(x)


q = int(input())
x = 0
i = 0
for num in range(0, q):
	a = input()
	if ord(a[0]) == 43 or ord(a[-1]) == 43:
		x = x + 1
	else:
		x = x - 1
	i = +1
print(x)


def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
l = ['a', 'e', 'i', 'o', 'u', 'y', 'A', 'E', 'O', 'I', 'U', 'Y']
ans = 0
for i in range(ii()):
	s = si()
	if s[0] == 'X':
		a = s[2]
	else:
		a = s[0]
	if a == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


counter = int(input())
value = 0
while counter != 0:
	command = input()
	if '--' in command:
		value -= 1
	else:
		value += 1
	counter -= 1
print(value)


n = int(input())
out = 0
for _ in range(n):
	s = input()
	if 'X' in s:
		if '++' in s:
			out += 1
		elif '--' in s:
			out -= 1
print(out)


n = int(input())
x = 0
for i in range(n):
	l = input()
	l = l.replace('X', '')
	if l == '++':
		x += 1
	elif l == '--':
		x -= 1
print(x)


n = int(input())
acts = [input() for x in range(n)]
print(len([x for x in acts if '+' in x]) - len([x for x in acts if '-' in x]))


n = int(input())
m = []
for i in range(n):
	m.append(int(input().replace('X', '').replace('--', '-1').replace('++', '1')))
print(sum(m))


n = int(input())
num = 0
for i in range(n):
	state = input().find('+')
	if state != -1:
		num += 1
	else:
		num -= 1
print(num)


numofline = int(input())
i = 1
statements = []
while i <= numofline:
	s = input()
	statements.append(s)
	i += 1
i = 1
x = 0
while i <= numofline:
	statemant_ = statements[i - 1]
	if statemant_[0] == '+' or statemant_[2] == '+':
		x = x + 1
	else:
		x = x - 1
	i += 1
print(x)


t = int(input())
x = 0
for i in range(t):
	s = input()
	if s == '++X' or s == 'X++':
		x += 1
	elif s == '--X' or s == 'X--':
		x -= 1
	else:
		pass
print(x)


x = int(input())
c = 0
import re
for i in range(x):
	text = input()
	d = 0
	for j in text:
		if re.match('[+]', j):
			d += 1
	if d == 0:
		c = c - 1
	else:
		c += 1
print(c)


n = int(input())
if n >= 1 and n <= 150:
	x = 0
	while n:
		X = str(input())
		if X == 'X++' or X == '++X':
			x = x + 1
		elif X == 'X--' or X == '--X':
			x = x - 1
		else:
			print('Wrong operator provided!')
		n = n - 1
	print(x)


n = int(input())
x = 0
while n > 0:
	string = input()
	if string.count('++'):
		x += string.count('++')
	elif string.count('--'):
		x -= string.count('--')
	n -= 1
print(x)


n = int(input())
x = 0
while n != 0:
	t = input().lower()
	if t == 'x++' or t == '++x':
		x += 1
	elif t == 'x--' or t == '--x':
		x -= 1
	n -= 1
print(x)


count = int(input())
result = 0
for i in range(count):
	s = input()
	if s.find('--') != -1:
		result -= 1
	elif s.find('++') != -1:
		result += 1
print(result)


n = int(input())
c = 0
a = []
for i in range(n):
	y = input()
	a.append(y)
for i in a:
	if i == '++X' or i == 'X++':
		c = c + 1
	if i == '--X' or i == 'X--':
		c = c - 1
print(c)


import sys
lines = sys.stdin.readlines()
count = int(lines[0])
x = 0
for op in lines[1:]:
	op = op.rstrip()
	if op == '++X' or op == 'X++':
		x += 1
	if op == '--X' or op == 'X--':
		x -= 1
print(x)


m = x = int(input())
a = []
while m > 0:
	m -= 1
	a.append(input())
i = 0
e = 0
while e < len(a):
	if a[e] == 'X++' or a[e] == '++X':
		i += 1
	elif a[e] == 'X--' or a[e] == '--X':
		i -= 1
	e += 1
print(i)


n = int(input(''))
x = 0
k = 0
for i in range(n):
	j = input('')
	if j == 'X++' or j == '++X':
		x = x + 1
	else:
		x = x - 1
print(x)


t = int(input())
r = 0
for i in range(t):
	s = input()
	for j in range(len(s)):
		if s[j - 1] == '+' and s[j] == '+':
			r += 1
		elif s[j - 1] == '-' and s[j] == '-':
			r -= 1
print(r)


count = int(input())
tot = 0
for i in range(count):
	op = input()
	if '+' in op:
		tot += 1
	else:
		tot -= 1
print(tot)


t = int(input())
x = 0
for z in range(t):
	s = input()
	a = list(s)
	if a[0] == '+':
		x = x + 1
	elif a[0] == '-':
		x = x - 1
	elif a[0] == 'X' and a[1] == '+':
		x = x + 1
	elif a[0] == 'X' and a[1] == '-':
		x = x - 1
print(x)


x = int(input())
y = 0
a = '+-X'
for i in range(x):
	s = input()
	if s[1] == a[0]:
		y = y + 1
	else:
		y = y - 1
print(y)


n = int(input())
x = 0
for m in range(n):
	g = input()
	if '++' in g:
		x += 1
	if '--' in g:
		x -= 1
print(x)


import sys
i = str(sys.stdin.readlines())
print(i.count('X++') - i.count('X--') + i.count('++X') - i.count('--X'))


suma = 1
resta = -1
x = 0
number_statements = input()
for i in range(int(number_statements)):
	op = input()
	op1 = list(op)
	if op1[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


def main():
	cases = int(input())
	x = 0
	for i in range(cases):
		l = input()
		if '-' in l:
			x -= 1
		elif '+' in l:
			x += 1
	print(x)
main()


import math
n = int(input())
x = 0
b = []
for i in range(n):
	a = input()
	b.append(a)
for i in b:
	if i == 'X++' or i == '++X':
		x += 1
	if i == '--X' or i == 'X--':
		x -= 1
print(x)


import sys
n = int(sys.stdin.readline())
x = 0
for _ in range(n):
	s = sys.stdin.readline().strip()
	if '++' in s:
		x += 1
	elif '--' in s:
		x -= 1
sys.stdout.write(str(x) + '\n')


n = int(input())
X = 0
while n > 0:
	operation = input()
	if '++' in operation:
		X += 1
	elif '--' in operation:
		X -= 1
	else:
		print('Invalid Operation')
	n -= 1
print(X)


n = int(input().strip())
arr = []
for i in range(n):
	arr.append(input().rstrip().split())
x = 0
for i in range(len(arr)):
	for j in arr[i]:
		if '+' in list(j):
			x += 1
			break
		elif '-' in list(j):
			x -= 1
			break
print(x)


n = input()
n = int(n)
x = 0
while n > 0:
	i = input()
	i = i.replace('X', '')
	if i == '--':
		x -= 1
	else:
		x += 1
	n -= 1
print(x)


t = int(input())
res = 0
while t > 0:
	t = t - 1
	s = input()
	if s[0] == '-' and s[1] == '-' and (s[2] == 'X') or (s[0] == 'X' and s[1] == '-' and (s[2] == '-')):
		res = res - 1
	elif s[0] == '+' and s[1] == '+' and (s[2] == 'X') or (s[0] == 'X' and s[1] == '+' and (s[2] == '+')):
		res = res + 1
print(res)


num = int(input())
result = 0
for i in range(num):
	line = input()
	if line[0] == '+' or line[1] == '+':
		result = result + 1
	elif line[0] == '-' or line[1] == '-':
		result = result - 1
	else:
		result = result
print(result)


def main():
	inp = int(input())
	c = 0
	for i in range(inp):
		B = input()
		c += 1 if '+' in B else -1
	print(c)
main()


a = int(input())
out = 0
for i in range(a):
	code = input()
	if code[1] == '+':
		out = out + 1
	elif code[1] == '-':
		out = out - 1
print(out)


def get_val(stmt, x):
	if stmt.find('-') == -1 and stmt.find('+') == -1:
		return x
	elif stmt.find('+') >= 0:
		x += 1
	else:
		x -= 1
	return x
n = int(input())
x = 0
for i in range(0, n):
	stmt = input()
	x = get_val(stmt, x)
print(x)


times = int(input())
x = 0
for i in range(times):
	a = list(input())
	if '+' in a:
		x += 1
	elif '-' in a:
		x -= 1
print(int(x))


from sys import stdin, stdout
n = int(stdin.readline())
x = 0
for _ in range(n):
	code = stdin.readline()
	if '++' in code:
		x += 1
	else:
		x -= 1
stdout.write(str(x))


n = int(input())
i = 1
x = 0
lst = []
bit = ['++X', 'X++', '--X', 'X--']
while i <= n:
	lst.append(input())
	i += 1
for el in lst:
	if el == bit[0] or el == bit[1]:
		x += 1
	else:
		x -= 1
print(x)


num = int(input())
answer = 0
for i in range(num):
	inp = input()
	if '++' in inp:
		answer += 1
	elif '--' in inp:
		answer -= 1
print(answer)


count = 0
times = int(input())
while times > 0:
	x = input()
	if '--' in x:
		count -= 1
	else:
		count += 1
	times -= 1
print(count)


get_input = lambda : list(map(int, input().split(' ')))

def watermelon_solution():
	size = int(input())
	if not size % 2 and size != 2:
		print('yes')
		return
	print('no')

def too_long_word_solution():
	num_words = int(input())
	abbreviations = []
	for i in range(num_words):
		word = input()
		if len(word) > 10:
			word = word[0] + str(len(word) - 2) + word[-1]
		abbreviations.append(word)
	print('\n'.join(abbreviations))

def theatre_square_solution():
	import math
	(n, m, a) = get_input()
	least_number = math.ceil(n / a) * math.ceil(m / a)
	print(least_number)

def a_team_solution():
	n = int(input())
	solved_problems = 0
	for i in range(n):
		(a, b, c) = get_input()
		solved_problems += (a | b) & (c | a) & (b | c)
	print(solved_problems)

def a_next_round_solution():
	(n, s) = get_input()
	scores = get_input()
	advanced_participants = 0
	last_participant_value = -1
	for (index, item) in enumerate(scores):
		if item > 0 and advanced_participants < s:
			advanced_participants += 1
			last_participant_value = item
		elif item == last_participant_value:
			advanced_participants += 1
		else:
			break
	print(advanced_participants)

def a_domino_piling():
	(m, n) = get_input()
	print(m * n // 2)

def a_string_task_solution():
	import re
	print('.' + '.'.join(list(re.sub('[a|u|o|i|e|y]*', '', input().lower()))))

def a_bitplusplus():
	x = 0
	n = int(input())
	for i in range(n):
		item = input()
		x = x + 1 if '+' in item else x - 1
	print(x)
a_bitplusplus()


n = int(input())
total = 0
for i in range(n):
	opration = input()
	if '++' in opration:
		total += 1
	elif '--' in opration:
		total -= 1
print(total)


N = int(input())
C = 0
D = 0
for j in range(N):
	L = input()
	if L == '++X':
		C += 1
	elif L == '--X':
		C -= 1
	elif L == 'X++':
		D = 1
	elif L == 'X--':
		D = -1
	if D != 0:
		C += D
		D = 0
print(C + D)


d = input()
d = int(d)
res = 0
for i in range(d):
	tab = input()
	tab = map(str, tab)
	if '+' in tab:
		res = res + 1
	else:
		res = res - 1
print(res)


ex = int(input())
i = x = 0
while i < ex:
	inp = input()
	if '++' in inp:
		x += 1
	if '--' in inp:
		x -= 1
	i += 1
print(x)


inp = int(input())
X = 0
for n in range(inp):
	string = list(input())
	for i in range(2):
		if string[i] == '+':
			if string[i + 1] == '+':
				X += 1
		if string[i] == '-':
			if string[i + 1] == '-':
				X -= 1
print(X)


def changex(s):
	if s[1] == '+':
		return 1
	return -1

def main():
	t = int(input())
	c = 0
	while t:
		t -= 1
		s = input()
		c += changex(s)
	print(c)
main()


total = 0
for i in range(int(input())):
	formula = input()
	for i in range(len(formula)):
		if formula[i] == '+':
			total += 1
		elif formula[i] == '-':
			total -= 1
print(total // 2)


n = int(input())
i = 1
fq = 2 * [0]
while i <= n:
	i += 1
	st = list(input())
	if '+' in st:
		fq[1] += 1
	else:
		fq[0] += 1
x = fq[1] - fq[0]
print(x)


x = 0
for _ in range(int(input())):
	s = input()
	for i in s:
		if i == '+':
			x += 1
			break
		elif i == '-':
			x -= 1
			break
print(x)


n = int(input())
c = 0
for i in range(n):
	m = input()
	if m[0] == 'X' and m[2] == '+':
		c += 1
	elif m[0] == 'X' and m[2] == '-':
		c -= 1
	elif m[2] == 'X' and m[0] == '-':
		c -= 1
	elif m[2] == 'X' and m[0] == '+':
		c += 1
print(c)


x = 0
y = int(input())
plus = ['++X', 'X++']
for i in range(y):
	com = input()
	if com in plus:
		x = x + 1
	else:
		x = x - 1
print(x)


numberOfIterations = int(input())
x = 0
for i in range(0, numberOfIterations):
	inputVal = input()
	if inputVal == 'X++' or inputVal == '++X':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
list = []
for _ in range(n):
	list.append(input())
	if list[_] == '++X' or list[_] == 'X++':
		x += 1
	elif list[_] == '--X' or list[_] == 'X--':
		x -= 1
print(x)


import re
x = 0
n = int(input())
for i in range(n):
	rawInput = input()
	if re.match('(X\\+\\+|\\+\\+X)', rawInput):
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
mas = 0
men = 0
for i in range(n):
	t = input()
	if t[0] == '-' or t[2] == '-':
		men += 1
	else:
		mas += 1
print(mas - men)


t = int(input())
p = 0
for i in range(t):
	s = input()
	if s == '++X' or s == 'X++':
		p = p + 1
	elif s == '--X' or s == 'X--':
		p = p - 1
print(p)


import math
import os
import random
import re
import sys
t = int(input())
c = 0
for x in range(t):
	b = input()
	if '+' in b:
		c = c + 1
	elif '-' in b:
		c = c - 1
print(c)


i = int(input())
l = []
X = 0
for v in range(i):
	l.append(input())
	if l[v] == 'X++' or l[v] == 'x++':
		X = X + 1
	elif l[v] == 'X--' or l[v] == 'x--':
		X = X - 1
	elif l[v] == '++X' or l[v] == '++x':
		X = X + 1
	elif l[v] == '--X' or l[v] == '--x':
		X = X - 1
	elif l[v] == '':
		v = v - 1
print(X)


T = int(input())
x = 0
for k in range(T):
	if '++' in input():
		x += 1
	else:
		x -= 1
print(x)


operation_count = int(input())
x = 0
for i in range(0, operation_count):
	operations = input()
	znak = '+'
	for operation in operations:
		if operation == '+':
			break
		elif operation == '-':
			znak = '-'
			break
	if znak == '+':
		x += 1
	else:
		x -= 1
print(x)


num = int(input())
val = 0
for i in range(num):
	s = input()
	if s[0] == '+' or s[1] == '+':
		val = val + 1
	else:
		val = val - 1
print(val)


n = 0
iteractions = int(input())
i = 0
while i < iteractions:
	string1 = input()
	if string1 == '++X' or string1 == 'X++':
		n += 1
	else:
		n -= 1
	i += 1
print(n)


(a, x) = (0, 0)
n = int(input())
while a < n:
	b = input()
	if b in '++X++':
		x += 1
	if b in '--X--':
		x -= 1
	a += 1
print(x)


line = input()
ans = 0
for _ in range(int(line)):
	i = input()
	if i[1] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


inp = int(input())
initial = 0
for _ in range(inp):
	x = input()
	if x in ['++X', 'X++']:
		initial += 1
	elif x in ['--X', 'X--']:
		initial -= 1
print(initial)


n = 0
for _ in range(int(input())):
	m = list(input())
	n += (m.count('+') - m.count('-')) / 2
print(int(n))


n = int(input())
variable = 0
for i in range(n):
	temp = input()
	if '++' in temp:
		variable += 1
	elif '--' in temp:
		variable -= 1
print(variable)


a = int(input())
x = 0
asd = 0
for i in range(a):
	s = str(input())
	if s == '++x' or s == '++X' or s == 'X++' or (s == 'x++'):
		asd += 1
	if s == '--x' or s == '--X' or s == 'x--' or (s == 'X--'):
		asd -= 1
print(asd)


x = 0

def func(a):
	global x
	if '+' in a:
		x += 1
	else:
		x -= 1
for i in range(int(input())):
	a = input()
	func(a)
print(x)


n = int(input())
b = 0
o = 0
while b < n:
	b += 1
	x = input()
	if '++' in x:
		o += 1
	elif '-' in x:
		o -= 1
	elif 'X' in x:
		o = o
	else:
		break
print(o)


n = int(input())
l = n
x = 0
while l > 0:
	s = input()
	if s[1] == '+':
		x += 1
	else:
		x -= 1
	l = l - 1
print(x)


x = 0
A = int(input())
for T in range(A):
	a = input()
	if a[0] == '+' or a[2] == '+':
		x = x + 1
	if a[0] == '-' or a[2] == '-':
		x = x - 1
print(x)


try:
	t = int(input())
	i = 0
	n = 0
	while i < t:
		k = input()
		if k[0] == '+' or k[1] == '+':
			n += 1
		else:
			n -= 1
		i += 1
	print(n)
except:
	pass


operations = int(input())
memory = 0
for x in range(operations):
	command = input()
	if '-' in command:
		memory -= 1
	else:
		memory += 1
print(memory)


x = int(input())
javab = 0
for i in range(0, x):
	y = input()
	y1 = list(y)
	if y[1] == '+':
		javab += 1
	else:
		javab -= 1
print(javab)


count = 0
cases = int(input())
for i in range(0, cases):
	c = input()
	if c[0] == '+' or c[2] == '+':
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
ls = []
x = 0
for i in range(1, n + 1):
	ls.append(input())
for j in ls:
	if j in ['X++', '++X']:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
statement_list = []
for i in range(n):
	statement = input()
	statement_list.append(statement)
increase = 0
decrease = 0
for i in range(n):
	if statement_list[i][1] == '+':
		increase += 1
	else:
		decrease += 1
x = increase - decrease
print(x)


n = int(input())
var = 0
for st in range(n):
	inp = input()
	if '++' in inp:
		var += 1
	else:
		var -= 1
print(var)


def bitlang(str, x):
	if ord(str[0]) == 43 or ord(str[2]) == 43:
		return 1
	else:
		return -1
x = 0
n = int(input())
lst = []
for case in range(n):
	lst.append(input())
for i in range(n):
	x = x + bitlang(lst[i], x)
print(x)


i = 0
strInputs = list()
n = int(input())
while i < n:
	strInputs.append(input())
	i += 1
x = 0
for i in strInputs:
	if i == '++X' or i == 'X++':
		x += 1
	elif i == '--X' or i == 'X--':
		x -= 1
print(x)


x = 0
n = int(input())
for c in range(0, n):
	o = input()
	if '++' in o:
		x += 1
	if '--' in o:
		x -= 1
print(x)


def main():
	n = int(input())
	sol = 0
	for _ in range(n):
		op = input()
		if '+' in op:
			sol += 1
		else:
			sol -= 1
	print(sol)
main()


n = int(input())
i = 1
L = []
m = 0
while not i > n:
	line = str(input())
	arr = list(line)
	if arr[0] == '+' and arr[1] == '+':
		m += 1
	if arr[0] == '+' and arr[2] == '+':
		m += 1
	if arr[2] == '+' and arr[1] == '+':
		m += 1
	if arr[0] == '-' and arr[1] == '-':
		m -= 1
	if arr[0] == '-' and arr[2] == '-':
		m -= 1
	if arr[2] == '-' and arr[1] == '-':
		m -= 1
	i += 1
print(m)


n = int(input())
statements = []
x = 0
for i in range(n):
	statement = input()
	statements.append(statement)
for statement in statements:
	if statement.count('++') > 0:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
t = 0
for i in range(n):
	a = input()
	if a[1:3] == '++' or a[:2] == '++':
		t += 1
	if a[:2] == '--' or a[1:3] == '--':
		t -= 1
print(t)


a = int(input())
X = 0
for i in range(a):
	k = input()
	if k[0] + k[1] == '++' or k[1] + k[2] == '++':
		X += 1
	elif k[1] + k[2] == '--' or k[0] + k[1] == '--':
		X -= 1
	else:
		continue
print(X)


n = int(input())
totalOperation = []
answer = 0
for operation in range(n):
	totalOperation.append(input())
for operation in totalOperation:
	if operation == '++X' or operation == 'X++':
		answer += 1
	elif operation == '--X' or operation == 'X--':
		answer -= 1
print(answer)


t = int(input())
x = 0
while t:
	opr = input()
	if '+' in opr:
		x += 1
	elif '-' in opr:
		x -= 1
	t -= 1
print(x)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools

def I():
	return int(sys.stdin.readline())

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def main():
	n = I()
	res = 0
	for _ in range(n):
		string = input()
		if string[0] == '-' or string[len(string) - 1] == '-':
			res -= 1
		else:
			res += 1
	return res
print(main())


x = 0
for i in range(int(input())):
	s = input()
	x = x + s.count('++')
	x = x - s.count('--')
print(x)


operations = int(input())
x = 0
for _ in range(operations):
	bit = list(input())
	if bit[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


t = int(input())
ans = 0
for i in range(0, t):
	x = input()
	if x[1] == '+':
		ans += 1
	elif x[1] == '-':
		ans -= 1
print(ans)


number_of_sentences = int(input())
X = 0
i = 0
while i < number_of_sentences:
	sentence = str(input())
	op = sorted(sentence)[0]
	if op == '+':
		X += 1
	elif op == '-':
		X -= 1
	i += 1
print(X)


Tc = int(input().strip())
count = 0
for i in range(0, Tc):
	data = input().strip()
	if data == '++X' or data == 'X++':
		count += 1
	elif data == '--X' or data == 'X--':
		count -= 1
print(count, end='')


x = int(input(''))
m = 0
h = 0
while x > 0:
	y = input('')
	for i in range(len(y)):
		u = 0
		v = 2
		if y[i:i + 2] == '++':
			m += 1
		elif y[i:i + 2] == '--':
			m -= 1
		elif y[i] == 'x':
			h += 1
	x -= 1
print(m)


input_list = []
starting = int(input())
x = 0
for i in range(starting):
	operation = input()
	operation = operation.lower()
	place = operation.find('x')
	if place == 0:
		operation = operation[1:2]
	else:
		operation = operation[0:1]
	operation = operation.strip()
	input_list.append(operation)
for element in input_list:
	if element == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


print(sum((1 - 2 * int('-' in input()) for _ in range(int(input())))))


emp = []
for _ in range(int(input())):
	count = 0
	n = input()
	for i in range(len(n)):
		if n[i] == '-':
			count += -0.5
		elif n[i] == '+':
			count += 0.5
	emp.append(count)
print(int(sum(emp)))


n = int(input())
x = 0
for i in range(n):
	statement = input('')
	if statement == '++X' or statement == 'X++':
		x = x + 1
	elif statement == '--X' or 'X--':
		x = x - 1
	else:
		continue
print(x)


i = int(input())
n = int(0)
plus = '+'
while i > 0:
	a = [str(s) for s in input().split()]
	if a[0].find(plus) != -1:
		n += 1
	else:
		n -= 1
	i -= 1
print(n)


n = int(input())
arr = []
X = 0
for i in range(n):
	state = str(input())
	arr.append(state)
for exp in arr:
	if exp == '++X' or exp == 'X++':
		X += 1
	if exp == '--X' or exp == 'X--':
		X -= 1
print(X)


n = int(input())
op = 0
for i in range(n):
	stmt = input().strip('X')
	if stmt == '++':
		op = op + 1
	else:
		op = op - 1
print(op)


x = input()
sol = 0
for i in range(int(x)):
	word = input()
	if word[1] == '+':
		sol += 1
	else:
		sol -= 1
print(sol)


a = int(float(input()))
n = 0
for i in range(a):
	b = input()
	if b == 'X++' or b == '++X':
		n = n + 1
	else:
		n = n - 1
print(n)
exit(0)


Y_list = []
while True:
	X = int(input())
	if 1 > X > 150:
		print('please provide a number between 1 to 150')
	break
while X != 0:
	Y = input()
	if (len(Y) != 3) & (Y in ['X++', '++X', 'X--', '--X']):
		print('Please provide a string of X and ++ and --')
		break
	Y_list.append(Y)
	X = X - 1
(inc, dec) = ('++', '--')

def operator(inp=Y_list):
	Z = 0
	for y in Y_list:
		if inc in y:
			Z = Z + 1
		elif dec in y:
			Z = Z - 1
	return Z
print(operator())


i = int(input())
x = 0
while i > 0:
	i -= 1
	s = input()
	if s.startswith('++') or s.endswith('++'):
		x += 1
	elif s.startswith('--') or s.endswith('--'):
		x -= 1
print(x)


test_case = int(input())
result = 0
while test_case:
	command = input()
	if command == '++X' or command == 'X++':
		result += 1
	elif command == '--X' or command == 'X--':
		result -= 1
	else:
		pass
	test_case -= 1
print(result)


x = 0
test = int(input())
while test > 0:
	get = input()
	if '++' in get:
		x = x + 1
	elif '--' in get:
		x = x - 1
	else:
		x = 0
	test = test - 1
print(x)


b = {'++X': 1, '--X': -1, 'X++': +1, 'X--': -1}
t = 0
for _ in range(int(input())):
	a = input()
	if a in b:
		t += b[a]
print(t)


n = int(input())
operand = ''
cnt = 0
for x in range(n):
	operand = input()
	if '++' in operand:
		cnt += 1
	else:
		cnt -= 1
print(cnt)


cnt = int(input())
x = 0
for i in range(cnt):
	cmd = input()
	if cmd == '++X' or cmd == 'X++':
		x += 1
	elif cmd == '--X' or cmd == 'X--':
		x -= 1
print(str(x))


t = int(input())
x = 0
for case in range(t):
	string = input()
	if string == '++X':
		x = x + 1
	if string == 'X++':
		x = x + 1
	if string == '--X':
		x = x - 1
	if string == 'X--':
		x = x - 1
print(x)


lines = int(input())
x = 0
for i in range(lines):
	operation = str(input())
	if '++' in operation:
		x = x + 1
	elif '--' in operation:
		x = x - 1
print(x)


x = 0
for _ in range(int(input())):
	s = input()
	if s[0] == 'X' or s[0] == 'x':
		if s[1] == '+':
			x += 1
		else:
			x -= 1
	elif s[0] == '+':
		x += 1
	else:
		x -= 1
print(x)


num = int(input())
x = 0
for t in range(num):
	v = input()
	if v[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


count = int(input())
num = 0
for i in range(count):
	opr = input()
	if opr == '++X' or opr == 'X++':
		num += 1
	elif opr == 'X--' or opr == '--X':
		num -= 1
	else:
		print('Invalid operation')
print(num)


v = 0
z = int(input())
for x in range(z):
	c = str(input())
	if '+' in c:
		v += 1
	else:
		v -= 1
print(v)


amount = int(input())
result = 0
for i in range(amount):
	input_str = input()
	if '+' in input_str:
		result += 1
	elif '-' in input_str:
		result -= 1
print(result)


x = 0
statements = int(input())
for itx in range(statements):
	statement = str(input())
	if statement == '++X' or statement == 'X++':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for _ in range(n):
	user_input = input()
	if user_input[0] == '+' or user_input[1] == '+':
		x += 1
	elif user_input[1] == '-' or user_input[2] == '-':
		x -= 1
print(x)


while True:
	s = int(input())
	if 1 <= s <= 150:
		break
x = 0
while s != 0:
	y = input()
	if y == '--x' or y == 'x--' or y == '--X' or (y == 'X--'):
		x = x - 1
	if y == '++x' or y == 'x++' or y == '++X' or (y == 'X++'):
		x = x + 1
	s = s - 1
print(x)


n = int(input())
sums = 0
for i in range(n):
	sta = input()
	if '+' in sta:
		sums += 1
	else:
		sums -= 1
print(sums)


def bit(n):
	list = []
	for i in range(n):
		list.append(input()[1])
	print(list.count('+') - list.count('-'))
bit(int(input()))


n = int(input(''))
c = 0
for i in range(n):
	inp = input('')
	if '+' in inp:
		c += 1
	elif '-' in inp:
		c -= 1
	else:
		pass
print(c)


n = int(input())
list_op = []
for item in range(n):
	list_op.append(input())
x = 0
for item in list_op:
	if '++' in item:
		x += 1
	elif '--' in item:
		x -= 1
print(x)


var = 0
n = int(input())
for i in range(0, n):
	s = input()
	if s in ['X++', '++X']:
		var = var + 1
	else:
		var = var - 1
print(str(var))


n = int(input())
rez = 0
for i in range(n):
	a = str(input())
	if list(a).count('+') == 2:
		rez += 1
	else:
		rez -= 1
print(rez)


n = int(input())
result = 0
for _ in range(n):
	statement = input().replace('X', '')
	if statement == '++':
		result += 1
	else:
		result -= 1
print(result)


import sys
bit = sys.stdin.read().splitlines()
c = 1
statements = int(bit[0])
x = int(0)
for (j, item) in enumerate(bit):
	bit[j] = item.replace('X', '')
while c <= statements:
	if bit[c] == '++':
		x = x + 1
	if bit[c] == '--':
		x = x - 1
	c = c + 1
print(x)


n = int(input())
count = 0
for i in range(n):
	string = str(input())
	if string == 'X++' or string == '++X':
		count = count + 1
	elif string == 'X--' or string == '--X':
		count = count - 1
print(count)


operator = int(input())

def CASE(s):
	if s == '++X' or s == 'X++':
		return 1
	return -1
result = 0
for i in range(operator):
	value = str(input())
	result += CASE(value)
print(result)


while True:
	try:
		n = input()
		m = 1
		x = 0
		c = []
		while m <= int(n):
			a = input()
			if '+' in a:
				x += 1
			else:
				x -= 1
			m += 1
		print(x)
	except EOFError:
		break


from sys import stdin
n = int(stdin.readline().strip())
res = 0
for i in range(n):
	op = stdin.readline().strip()
	res += 1 if op[0 if op[-1] == 'X' else -1] == '+' else -1
print(res)


n = int(input())
x = 0
for _ in range(n):
	s = str(input())
	s = list(s)
	s = s[1]
	if '+' == s:
		x = x + 1
	else:
		x = x - 1
print(x)


n = int(input())
x = 0
for i in range(n):
	s = input().lower()
	l = s.split('x')
	if l.count('++') > 0:
		x = x + 1
	elif l.count('--') > 0:
		x = x - 1
print(x)


number_of_statements = int(input())
container_list = [' '] * number_of_statements
x = 0
for y in container_list:
	y = input()
	if y == '++X' or y == 'X++':
		x += 1
	elif y == '--X' or y == 'X--':
		x -= 1
	else:
		continue
print(x)


result = 0
for i in range(int(input())):
	operation = input()
	result = result - 1 if operation.find('+') == -1 else result + 1
print(result)


plus = 0
minus = 0
for _ in range(int(input())):
	o = input()
	plus += o.count('+') // 2
	minus += o.count('-') // 2
print(plus - minus)


t = int(input())
ans = 0
for i in range(t):
	stmt = input().strip()
	if '++' in stmt:
		ans += 1
	elif '--' in stmt:
		ans -= 1
print(ans)


n = int(input())
count = 0
try:
	for i in range(n):
		newline = input()
		if '++' in newline:
			count = count + 1
		else:
			count = count - 1
except EOFError:
	pass
print(count)


n = int(input())
main_count = 0
for i in range(n):
	oper_list = input()
	if oper_list[0] == '+' or oper_list[2] == '+':
		main_count = main_count + 1
	if oper_list[0] == '-' or oper_list[2] == '-':
		main_count = main_count - 1
print(main_count)


t = int(input())
x = 0
while True:
	statement = input()
	str1 = '++'
	str2 = '--'
	if statement.find(str1) != -1:
		x = x + 1
	elif statement.find(str2) != -1:
		x = x - 1
	t = t - 1
	if t == 0:
		break
print(x)


n = int(input())
count = 0
ops = []
for i in range(n):
	x = input()
	ops.append(x)
for o in ops:
	if '++' in o:
		count += 1
	if '--' in o:
		count -= 1
print(count)


from random import randint
x = 0
n = int(input())
for i in range(n):
	y = input()
	if y == '++X' or y == 'X++':
		x += 1
	elif y == '--X' or y == 'X--':
		x -= 1
print(x)


n = int(input())
k = 0
for i in range(n):
	s = list(input())
	if s[0] == 'X':
		if s[2] == '+':
			k += 1
		elif s[2] == '-':
			k -= 1
	elif s[2] == 'X':
		if s[0] == '+':
			k += 1
		elif s[0] == '-':
			k -= 1
print(k)


def bit(lst):
	count = 0
	for elem in lst:
		if '+' in elem:
			count += 1
		else:
			count -= 1
	return count
n = int(input())
a = list()
for i in range(n):
	s = input()
	a.append(list(s))
print(bit(a))


n = int(input())
cur = 0
for _ in range(n):
	s = input()
	if s[0] == '+' or s[-1] == '+':
		cur += 1
	elif s[0] == '-' or s[-1] == '-':
		cur -= 1
print(cur)


t = int(input())
z = 0
for _ in range(t):
	s = input()
	if s == 'X++' or s == '++X':
		z += 1
	else:
		z -= 1
print(z)


n = int(input())
k = 0
i = 0
while i < n:
	s = input()
	if s[1] == '-':
		k -= 1
	else:
		k += 1
	i += 1
print(k)


n = input()
lt = []
x = 0
for i in range(int(n)):
	ai = input()
	lt.append(ai)
for o in lt:
	for r in str(o):
		if r == '+':
			x = x + 1
			break
		elif r == '-':
			x = x - 1
			break
print(x)


n = int(input())
x = 0
for itch in range(0, n):
	sta = input()
	if sta == 'X++' or sta == '++X':
		x += 1
	elif sta == 'X--' or sta == '--X':
		x -= 1
	else:
		continue
print(x)


n = int(input())
print(sum((input().count('+') - 1 for i in range(n))))


var = 0
num = int(input())
for i in range(num):
	x = input()
	if x[0] == '+' or x[1] == '+' or x[2] == '+':
		var = var + 1
	else:
		var -= 1
print(str(var))


n = int(input())
val = 0
while n:
	statement = input()
	if statement[1] == '+':
		val += 1
	else:
		val -= 1
	n -= 1
print(val)


n = int(input())
li = []
for i in range(n):
	li.append(input())
lis = []
for i in range(n):
	if li[i] == 'X++' or li[i] == '++X':
		lis.append(1)
	elif li[i] == 'X--' or li[i] == '--X':
		lis.append(-1)
s = 0
s = sum(lis)
print(s)


n = int(input())
count = 0
for i in range(0, n):
	x = input()
	if x.count('++') == 1 and x.count('X') == 1:
		count += 1
	elif x.count('--') == 1 and x.count('X') == 1:
		count -= 1
	else:
		count += 0
print(count)


from sys import stdin
n = int(input(''))
operations = list()
for i in range(n):
	operations.append([str(i) for i in stdin.readline().split()])
x = 0
for operation in operations:
	if str(operation[0]) == '++X' or str(operation[0]) == 'X++':
		x += 1
	else:
		x -= 1
print(x)


bit = {'++X': 1, '--X': -1, 'X++': 1, 'X--': -1}
count = 0
for _ in range(int(input())):
	count += bit[input()]
print(count)


y = 0
for x in range(int(input())):
	y = eval(str(y) + str(input()[1]) + '1')
print(y)


x = 0
z = int(input(''))
for i in range(z):
	m = input('')
	if m == 'X++' or m == '++X':
		x += 1
	else:
		x -= 1
print(x)


def bit(n):
	x = 0
	if 1 <= n <= 150:
		for i in range(n):
			string = input()
			if string == '++X' or string == 'X++':
				x += 1
			elif string == '--X' or string == 'X--':
				x -= 1
	print(x)
res = bit(int(input()))


n = int(input())
val = 0
for i in range(0, n):
	expr = input()
	if expr[1] == '+':
		val += 1
	else:
		val -= 1
print(val)


def bit(arr):
	x = 0
	for i in arr:
		if i == 'X++' or i == '++X':
			x += 1
		elif i == '--X' or i == 'X--':
			x -= 1
	return print(x)
n = int(input())
arr = []
for i in range(n):
	arr.append(input())
bit(arr)


X = 0
for i in range(int(input())):
	tem = input()
	if tem == 'X++' or tem == '++X' or tem == '+X+':
		X = X + 1
	else:
		X = X - 1
print(X)


from sys import stdin

def iinput():
	return int(stdin.readline())

def sinput():
	return input()

def minput():
	return map(int, stdin.readline().split())

def linput():
	return list(map(int, stdin.readline().split()))
n = iinput()
x = 0
while n:
	p = sinput()
	if '++' in p:
		x += 1
	else:
		x -= 1
	n -= 1
print(x)


n = int(input())
output = 0
for i in range(n):
	code = input()
	if code.find('++') != -1:
		output += 1
	else:
		output -= 1
print(output)


sum = 0
y = int(input())
while y != 0:
	x = str(input())
	if x == '++X' or x == 'X++':
		sum += 1
	elif x == '--X' or x == 'X--':
		sum -= 1
	y -= 1
print(sum)


n = int(input().strip())
r = 0
for _ in range(n):
	st = input().strip()
	if st[0] == 'X':
		if st[2] == '+':
			r = r + 1
		else:
			r = r - 1
	elif st[0] == '+':
		r = r + 1
	else:
		r = r - 1
print(r)


n = input()
n = int(n)
bit = []
x = 0
for i in range(0, n):
	i = input()
	bit.append(i)
for i in bit:
	if i.startswith('+') or i.endswith('+'):
		x = x + 1
	else:
		x = x - 1
print(x)


import re
add = 'X\\+\\+|\\+\\+X'
subtract = 'X--|--X'
n = int(input())
list = []
a = 0
for i in range(n):
	c = input()
	if re.match(add, c):
		a = a + 1
	elif re.match(subtract, c):
		a = a - 1
print(a)


T = int(input())
ans = 0
for i in range(T):
	lst = input()
	lst = list(lst)
	noOfPlusSign = lst.count('+') // 2
	noOfNegSign = lst.count('-') // 2
	ans = ans + noOfPlusSign - noOfNegSign
print(ans)


def bit():
	n = int(input())
	x = 0
	for i in range(0, n):
		op = str(input())
		if op == 'X++' or op == '++X':
			x += 1
		if op == 'X--' or op == '--X':
			x -= 1
	print(x)
bit()


n = int(input())
statements = []
for i in range(n):
	statements.append(input())
x = 0
for i in statements:
	if 'x++' in i.lower() or '++x' in i.lower():
		x += 1
	else:
		x -= 1
print(x)


X = 0
n = int(input())
while n > 0:
	x = input()
	if x[1] == '+':
		X += 1
	else:
		X -= 1
	n -= 1
print(X)


x = 0
for _ in range(int(input())):
	Z = list(str(input()))
	if '+' in Z:
		x = x + 1
	elif '-' in Z:
		x = x - 1
	else:
		x = x
print(x)


no_of_args = int(input())
statements = []
for take_inp in range(no_of_args):
	inp = input()
	statements.append(inp)
finOutput = 0
for calc in statements:
	if '+' in calc:
		if 'X' in calc:
			finOutput += 1
	elif '-' in calc:
		if 'X' in calc:
			finOutput -= 1
print(finOutput)


x = 0
number = int(input())
for i in range(number):
	h = input()
	if h.find('++') > -1:
		x += 1
	else:
		x -= 1
print(x)


import sys
n = int(sys.stdin.readline())
result = 0
for i in range(n):
	inputs = sys.stdin.readline()
	result = result - 1 if inputs.find('+') == -1 else result + 1
print(result)


n = int(input())
x = 0
for i in range(n):
	s = input()
	t1 = '+'
	t2 = '-'
	if t1 in s:
		x += 1
	elif t2 in s:
		x -= 1
print(x)


n = int(input())
po = 0
ot = 0
for i in range(n):
	a = input()
	if a[1:] == '++' or a[:2] == '++':
		po += 1
	else:
		ot += 1
print(po - ot)


n = int(input())
ans = 0
x = 0
for i in range(n):
	s = input()
	if s[0] == '+':
		ans += 1
		x += 1
	elif s[0] == '-':
		ans -= 1
		x -= 1
	if s[2] == '+':
		ans = x
		x += 1
	elif s[2] == '-':
		ans = x
		x -= 1
print(x)


x = 0
for i in range(int(input())):
	ins = input().strip()
	if '+' in ins:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
sum1 = 0
for i in range(n):
	op = input()
	if op.find('++') > -1:
		sum1 += 1
	elif op.find('--') > -1:
		sum1 -= 1
print(sum1)


n = int(input())
lover = 0
while n > 0:
	n -= 1
	ssfd = input()
	for x in ssfd:
		if x == 'X':
			continue
		if x == '+':
			lover += 1 / 2
		if x == '-':
			lover -= 1 / 2
print(int(lover))


x = int(input())
y = '++'
z = '--'

def solve(list):
	if list.find(y) >= 0:
		return 1
	elif list.find(z) >= 0:
		return -1
count = 0
for i in range(x):
	list = input()
	count += solve(list)
print(count)


inp = input()
x = 0
for i in range(int(inp)):
	inpl = input()
	if '++' in inpl:
		x = x + 1
	elif '--' in inpl:
		x = x - 1
print(x)


x = 0
n = int(input())
operate = {'++X': 1, '--X': 2, 'X++': 3, 'X--': 4}
for i in range(n):
	a = input()
	b = operate[a]
	if b == 1 or b == 3:
		x += 1
	else:
		x -= 1
print(x)


r = 0
t = int(input())
for _ in range(t):
	s = input()
	if '+' in s:
		r += 1
	else:
		r -= 1
print(r)


s = int(input())
k = 0
plus = ['+']
minus = ['-']
for i in range(s):
	sign = input()
	if sign[1] in plus:
		k = k + 1
	if sign[1] in minus:
		k = k - 1
print(k)


opNr = int(input())
x = 0
for i in range(opNr):
	op = input()
	if '++' in op:
		x += 1
	elif '--' in op:
		x -= 1
print(x)


def main() -> int:
	n = input
	n = int(n())
	x = 0
	for i in range(n):
		s = input()
		for i in range(3):
			if s[i] == '+':
				x += 1
				break
			elif s[i] == '-':
				x -= 1
				break
	print(x)
main()


n = int(input())
count = 0
for l in range(n):
	l = input('')
	if '++' in l:
		count = count + 1
	else:
		count = count - 1
print(count)


n = int(input())
count = 0
x = 0
while count < n:
	s = input()
	if '+' in s:
		x += 1
	elif '-' in s:
		x -= 1
	else:
		pass
	count += 1
print(x)


n = int(input())
t = 0
number = 0
while True:
	if n > t:
		statement = input()
		letters = list(statement)
		if letters[1] == '-':
			number = number - 1
		if letters[1] == '+':
			number = number + 1
		t = t + 1
	else:
		break
print(number)


def solve(arr):
	req = 0
	c = arr.count('X++')
	y = arr.count('++X')
	m = arr.count('X--')
	d = arr.count('--X')
	print(c + y - m - d)
y = int(input())
x = []
for i in range(y):
	m = input()
	x.append(m)
solve(x)


m = int(input())
output = 0
for i in range(m):
	n = input()
	if '--' in n:
		output = output - 1
	elif '++' in n:
		output = output + 1
print(output)


n = int(input())
h = 0
while n > 0:
	s = input()
	if s[1] == '+':
		h = h + 1
	if s[1] == '-':
		h = h - 1
	n = n - 1
print(h)


t = int(input())
num = 0
for i in range(0, t):
	W = input()
	if W == 'X++' or W == '++X':
		num += 1
	else:
		num -= 1
print(num)


def bit():
	res = 0
	num_oper = int(input())
	for i in range(num_oper):
		op = input()
		if op[1] == '+':
			res += 1
		else:
			res -= 1
	print(res)
bit()


n = int(input())
ans = 0
for _ in range(n):
	value = input()
	if '++X' in value:
		ans += 1
	elif 'X++' in value:
		ans += 1
	elif 'X--' in value:
		ans -= 1
	else:
		ans -= 1
print(ans)


N = int(input())
x = 0
for y in range(N):
	a = input()
	if a[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


x = 0
n = int(input())
while n > 0:
	bit = input()
	n -= 1
	if bit.count('+') == 2:
		x += 1
	elif bit.count('-') == 2:
		x -= 1
print(x)


ans = 0
count = int(input())
for i in range(0, count):
	operation = input()
	if operation == '++X' or operation == 'X++':
		ans += 1
	if operation == '--X' or operation == 'X--':
		ans -= 1
print(ans)


X = 0
for _ in range(int(input())):
	a = list(str(input()))
	if a[0] == '+' or a[1] == '+':
		X += 1
	else:
		X -= 1
print(X)


t = int(input())
result = 0
for i in range(t):
	s = input().strip()
	if '+' in s:
		result = result + 1
	elif '-' in s:
		result = result - 1
print(result)


n = int(input())
result = 0
for i in range(n):
	inputs = input()
	result = result - 1 if inputs.find('+') == -1 else result + 1
print(result)


n = int(input())
print(sum(([-1, 1]['+' in input()] for _ in range(n))))


n = int(input())
x = 0
for k in range(0, n):
	ent = str(input())
	if ent == '++X':
		x = x + 1
	if ent == '--X':
		x = x - 1
	if ent == 'X++':
		x = x + 1
	if ent == 'X--':
		x = x - 1
print(x)


def solve(s):
	x = 0
	for i in range(len(s)):
		if s[i].count('-') > 0:
			x -= 1
		else:
			x += 1
	return x
t = int(input())
s = [input() for t in range(t)]
result = solve(s)
print(result)


number = int(input())
value = 0
while number > 0:
	if input().find('+') != -1:
		value += 1
	else:
		value -= 1
	number -= 1
print(value)


n = int(input())
x = 0
forms = {'++X': 1, 'X++': 1, '--X': -1, 'X--': -1}
for i in range(n):
	q = input()
	x += forms[q]
print(x)


def execute_bit_program(arr):
	x = 0
	for i in arr:
		if '+' in i:
			x += 1
		else:
			x -= 1
	return x
n = int(input())
arr = []
while n > 0:
	arr.append(input())
	n -= 1
print(execute_bit_program(arr))


n = int(input())
x = 0
while n > 0:
	n -= 1
	firstIncBool = False
	firstDecBool = False
	line = input()
	for i in range(len(line)):
		if line[i] == 'X':
			continue
		if line[i] == '+' and firstIncBool:
			firstIncBool = False
			continue
		if line[i] == '+':
			firstIncBool = True
			x += 1
		if line[i] == '-' and firstDecBool:
			firstDecBool = False
			continue
		if line[i] == '-':
			firstDecBool = True
			x -= 1
print(x)


line = input()
x = 0
while True:
	try:
		line = input()
		if line == '++X' or line == 'X++':
			x += 1
		elif line == '--X' or line == 'X--':
			x -= 1
	except EOFError:
		break
print(x)


n = eval(input())
i = 0
c = 0
while i < n:
	x = input()
	if x == 'X++' or x == '+X+' or x == '++X':
		c += 1
	else:
		c -= 1
	i += 1
print(c)


n = int(input())
sum = 0
for _ in range(n):
	bit = input()
	if bit[0] == '+' or bit[1] == '+':
		sum += 1
	else:
		sum -= 1
print(sum)


n = int(input())
sum = 0
for a in range(n):
	b = input()
	if '--' in b:
		sum -= 1
	if '++' in b:
		sum += 1
print(sum)


def main():
	n = int(input())
	B = [input().rstrip() for _ in range(n)]
	ans = 0
	for i in B:
		ans += 1 if '+' in i else -1
	print(ans)
main()


n = int(input())
x = 0
for i in range(n):
	str1 = input()
	if str1 == 'X++':
		x += 1
	elif str1 == 'X--':
		x -= 1
	elif str1 == '++X':
		x += 1
	elif str1 == '--X':
		x -= 1
	else:
		break
print(x)


n = int(input())
xyz = 0
for i in range(n):
	str = input()
	if str == '++X' or str == 'X++':
		xyz += 1
	elif str == '--X' or str == 'X--':
		xyz -= 1
print(xyz)


n = int(input())
sum1 = 0
for i in range(n):
	a = input()
	for k in range(3):
		if a[k] == '+' and a[k + 1] == '+':
			sum1 += 1
			break
		elif a[k] == '-' and a[k + 1] == '-':
			sum1 -= 1
			break
print(sum1)


n = int(input())
x = 0
for a in range(n):
	op = input()
	if op.count('+') == 2:
		x += 1
	else:
		x -= 1
print(x)


n = input()
re = 0
for i in range(int(n)):
	cmd = input()
	if cmd == '++x' or cmd == 'x++' or cmd == '++X' or (cmd == 'X++'):
		re = re + 1
	else:
		re = re - 1
print(re)


sol = 0
for _ in range(int(input())):
	oper = input()
	if oper[0] == '+' or oper[1] == '+':
		sol += 1
	else:
		sol -= 1
print(sol)


t = int(input())
cnt = 0
while t > 0:
	val = input()
	if '+' in val:
		cnt += 1
	else:
		cnt -= 1
	t -= 1
print(cnt)


n = int(input())
a = 0
for j in range(n):
	s = input()
	if s[1] == '+':
		a = a + 1
	elif s[1] == '-':
		a = a - 1
print(a)


import sys
x = 0
n = int(sys.stdin.readline())
for line in sys.stdin:
	if '+' in line:
		x = x + 1
print(2 * x - n)


n = int(input())
val = 0
for _ in range(n):
	expression = input()
	if expression[0] == 'X':
		if expression[1:] == '++':
			val += 1
		elif expression[1:] == '--':
			val -= 1
	elif expression[-1] == 'X':
		if expression[:2] == '++':
			val += 1
		elif expression[:2] == '--':
			val -= 1
print(val)


from sys import stdin

def main():
	n = int(stdin.readline())
	cont = 0
	for i in range(n):
		op = stdin.readline()
		if ('X' in op or 'x' in op) and '+' in op:
			cont += 1
		elif ('X' in op or 'x' in op) and '-' in op:
			cont -= 1
	print(cont)
main()


n = int(input())
ans = 0
for i in range(n):
	a = list(input())
	if '-' in a:
		ans -= 1
	else:
		ans += 1
print(ans)


n = int(input())
t = 0
int(t)
for i in range(n):
	p = input()
	if p[0] == '-':
		t -= 1
	elif p[0] == '+':
		t += 1
	elif p[2] == '-':
		t -= 1
	elif p[2] == '+':
		t += 1
print(t)


n = int(input())
L = []
for i in range(n):
	L.append(input())
C = L.count('++X')
V = L.count('X++')
B = L.count('--X')
N = L.count('X--')
print(C + V - (B + N))


n = int(input())
i = 0
ans = 0
while i < n:
	i += 1
	s = input()
	if s == '++X' or s == 'X++':
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
l = []
for i in range(n):
	w = list(input())
	l.append(w)
z = 0
t = 0
for i in range(n):
	x = l[i].count('+')
	z = z + x
	y = l[i].count('-')
	t = t + y
m = int(z / 2 - t / 2)
print(m)


t = int(input())
ans = 0
for i in range(t):
	L = list(input())
	if L[0] == '+' or L[-1] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
cnt = 0
for i in range(n):
	line = input()
	if line.count('+') > 0:
		cnt += 1
	else:
		cnt -= 1
print(cnt)


n = int(input())
lists = []
for i in range(n):
	a = list(input())
	lists += a
print(int((lists.count('+') - lists.count('-')) / 2))


x = 0
for i in range(int(input())):
	a = input()
	d = 0
	for c in a:
		if c == '-':
			d += 1
	if d == 2:
		x -= 1
	else:
		x += 1
print(x)


num_of_op = int(input())
result = 0
for x in range(num_of_op):
	op = input()
	if op[0] == '+' or op[-1] == '+':
		result += 1
	else:
		result -= 1
print(result)


n = int(input())
final = 0
for i in range(n):
	k = input()
	arr = [x for x in k]
	if arr[0] != 'X':
		if arr[0] == '+':
			final += 1
		else:
			final -= 1
	elif arr[len(arr) - 1] == '+':
		final += 1
	else:
		final -= 1
print(final)


c = 0
n = int(input())
while n > 0:
	s = input().strip()
	if s[1] == '-':
		c -= 1
	else:
		c += 1
	n -= 1
print(c)


import sys

def interpret(code):
	x = 0
	for line in code:
		line = line.strip()
		if line == '++X' or line == 'X++':
			x = x + 1
		elif line == '--X' or line == 'X--':
			x = x - 1
		else:
			raise Exception('Unknown statement: %s' % line)
	return x

def main(args):
	lines = sys.stdin.readlines()
	n = int(lines[0])
	code = lines[1:]
	print(interpret(code))
main(sys.argv)


no_of_testcases = int(input())
value_of_x = 0
for i in range(no_of_testcases):
	string = input()
	if '+' in string:
		value_of_x = value_of_x + 1
	else:
		value_of_x = value_of_x - 1
print(value_of_x)


n = int(input())
total = 0
for i in range(n):
	userInput = input()
	if userInput == '++X':
		total = total + 1
	if userInput == 'X++':
		total = total + 1
	if userInput == '--X':
		total = total - 1
	if userInput == 'X--':
		total = total - 1
print(total)


n = int(input())
x = 0
while n > 0:
	n -= 1
	s = input()
	for i in s:
		if i is '+':
			x += 1
		if i is '-':
			x -= 1
		else:
			x = x
print(int(x / 2))


num = 0
for i in range(int(input())):
	a = input()
	if a == 'X++' or a == '++X' or a == '+X+':
		num += 1
	if a == 'X--' or a == '--X' or a == '-X-':
		num -= 1
print(num)


X = 0
N = int(input())
for i in range(1, N + 1):
	op = str(input())
	if op == '++X' or op == 'X++':
		X = X + 1
	elif op == '--X' or op == 'X--':
		X = X - 1
print(X)


number = int(input())
i = 1
x = 0
while i <= number:
	line = input()
	if '+' in line:
		x = x + 1
	if '-' in line:
		x = x - 1
	i += 1
print(x)


a = int(input())
c = ['+']
d = 0
for i in range(a):
	i = input()
	b = list(i)
	b.remove('X')
	for i in b:
		if i in c:
			d = d + 1
		else:
			d = d - 1
print(d // 2)


X = 0
a = int(input(''))
while a != 0:
	operation = str(input(''))
	X = X + (1 if '+' in operation else -1)
	a -= 1
print(X)


from sys import stdin

def main():
	a = int(input())
	cont = 0
	for i in range(0, a):
		b = input()
		if b[1] == '+':
			cont = cont + 1
		else:
			cont = cont - 1
	print(cont)
main()


n = int(input())
x = 0
i = 0
while i < n:
	ch = str(input())
	if ch[1] == '+':
		x += 1
	else:
		x -= 1
	i += 1
print(x)


statements = input()
statements = int(statements)
y = 0
i = 0
while i < statements:
	operation = input()
	if operation == '++X':
		y = y + 1
	elif operation == 'X++':
		y = y + 1
	elif operation == '--X':
		y = y - 1
	elif operation == 'X--':
		y = y - 1
	i = i + 1
print(y)


a = int(input())
j = 0
p = 0
while j < a:
	c = str(input())
	if c == '++X' or c == 'X++':
		p += 1
	else:
		p -= 1
	j += 1
print(p)


lines = []
while True:
	number = input()
	for _ in range(int(number)):
		x = input()
		lines.append(x)
	break
x = 0
for i in lines:
	if '++' in i:
		x += 1
	elif '--' in i:
		x -= 1
print(x)


n = int(input())
iks = 0
for i in range(n):
	x = input()
	plus = minus = False
	if x[1] == '+':
		plus = True
	else:
		minus = True
	if plus:
		iks += 1
	else:
		iks -= 1
print(iks)


x_input = int(input(''))
a = 0
while x_input > 0:
	y = input('')
	if y.lower() == '++x' or y.lower() == 'x++':
		a += 1
	elif y.lower() == '--x' or y.lower() == 'x--':
		a -= 1
	x_input -= 1
print(a)


n = int(input())
x = 0
for a in range(0, n):
	z = input()
	if ('+' in z) == True:
		x += 1
	else:
		x -= 1
print(x)


t = input()
a = ''
for i in range(0, int(t)):
	s = input()
	a += s
print(a.count('++') - a.count('--'))


a = int(input())
x = 0
count = 0
while x < a:
	b = str(input())
	if '+' in b:
		count = count + 1
	else:
		count = count - 1
	x = x + 1
print(count)


n = int(input())
l = []
for i in range(n):
	l.append(list(map(str, input().split())))
count = 0
for i in l:
	if i == ['++X'] or i == ['X++']:
		count = count + 1
	else:
		count = count - 1
print(count)


inputs = int(input())
x = 0
for _ in range(inputs):
	line = input().strip()
	if line == 'X++' or line == '++X':
		x += 1
	elif line == 'X--' or line == '--X':
		x -= 1
print(x)


import sys
local_launch = False
try:
	open('LOCAL').read()
	local_launch = True
except:
	pass
input_data = open('INPUT.txt').read() if local_launch else sys.stdin.read()
done = {'i': 0}
tokens = input_data.split()

def next_token():
	result = tokens[done['i']]
	done['i'] += 1
	return result

def next_int():
	return int(next_token())

def next_str():
	return next_token()

def sum(a):
	z = 0
	for i in range(len(a)):
		z = z + a[i]
	return z

def max(a):
	maz = a[0]
	for i in range(len(a)):
		if maz < a[i]:
			maz = a[i]
	return maz

def min(a):
	mix = a[0]
	for i in range(len(a)):
		if mix > a[i]:
			mix = a[i]
	return mix

def argmax(a):
	id = 0
	maz = a[0]
	for i in range(len(a)):
		if maz < a[i]:
			maz = a[i]
			id = i
	return id

def argmin(a):
	id = 0
	mix = a[0]
	for i in range(len(a)):
		if mix > a[i]:
			mix = a[i]
			id = i
	return id

def argmax_last(a):
	id = 0
	maz = a[0]
	for i in range(len(a)):
		if maz <= a[i]:
			maz = a[i]
			id = i
	return id

def argmin_last(a):
	id = 0
	mix = a[0]
	for i in range(len(a)):
		if mix >= a[i]:
			mix = a[i]
			id = i
	return id
n = next_int()
x = 0
for i in range(n):
	s = next_str()
	if '+' in s:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
ans = 0
while n > 0:
	n -= 1
	a = input()
	if '+' in a:
		ans += 1
	elif '-' in a:
		ans -= 1
print(ans)


cases = int(input())
i = 1
result = 0
while i <= cases:
	inde = input()
	if inde == '++X' or inde == 'X++':
		result += 1
	else:
		result -= 1
	i += 1
print(result)


x = int(input())
s1 = 0
for i in range(x):
	s = str(input())
	if '++' in s:
		s1 += 1
	else:
		s1 -= 1
print(s1)


n = int(input())
w = 0
for i in range(n):
	q = input()
	if q.find('+') == -1:
		w -= 1
	else:
		w += 1
print(w)


t = int(input())
c = 0
while t > 0:
	A = list(input())
	if A[0] == '+' or A[2] == '+':
		c = c + 1
	elif A[0] == '-' or A[2] == '-':
		c = c - 1
	t = t - 1
print(c)


num = input()
x = 0
for i in range(int(num)):
	string = input()
	sString = list(string)
	if sString[1] == '+':
		x = x + 1
	elif sString[1] == '-':
		x = x - 1
print(x)


a = int(input())
c1 = 0
plus = ['+']
min = ['-']
co = 0
poi = 0
li = []
while c1 != a:
	b = str(input())
	for i in b:
		li.append(i)
	c1 += 1
	if bool(set(plus) & set(li)):
		co += 1
		li.clear()
	elif bool(set(min) & set(li)):
		co -= 1
		li.clear()
print(co)


N = int(input())
sum = 0
while N > 0:
	inp = input()
	if inp[0] == '+':
		sum = sum + 1
	elif inp[0] == '-':
		sum = sum - 1
	elif inp[2] == '-':
		sum = sum - 1
	else:
		sum = sum + 1
	N = N - 1
print(sum)


x = 0
for _ in [0] * int(input()):
	if '+' in str(input()):
		x += 1
	else:
		x -= 1
print(x)


x = int(input())
p = n = 0
for n in range(x):
	y = input()
	if y == 'X++' or y == '++X':
		p = p + 1
print(p + (x - p) * -1)


z = int(input())
i = 0
x = 0
while z > i:
	temp = input()
	if '++X' in temp or 'X++' in temp:
		x += 1
	else:
		x -= 1
	i += 1
print(x)


n = int(input().strip())
su = 0
for i in range(n):
	p = input()
	p = list(p)
	if p[0] == '+' or p[2] == '+':
		su += 1
	else:
		su -= 1
print(su)


res = 0
for _ in [0] * int(input()):
	x = input()
	if '+' in x:
		res += 1
	if '-' in x:
		res -= 1
print(res)


n = int(input())
x = 0
for i in list(range(n)):
	statement = input()
	if statement[0] == 'X':
		if statement[-1] == '+':
			x = x + 1
		else:
			x = x - 1
	elif statement[0] == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


def operate(strling):
	if strling[0] == '+' or strling[1] == '+':
		return 1
	else:
		return -1
x = 0
n = int(input())
for i in range(0, n):
	strling = input()
	x += operate(strling)
print(x)


def main():
	n = int(input())
	values = []
	for i in range(0, n):
		values.append(input())
	result = 0
	for v in values:
		if len(list(filter(lambda s: s == '+', v))) == 2:
			result = result + 1
		if len(list(filter(lambda s: s == '-', v))) == 2:
			result = result - 1
	return result
print(main())


p = int(input())
x = 0
while p > 0:
	op = input()
	if op == '++X' or op == 'X++':
		x += 1
	else:
		x -= 1
	p -= 1
print(x)


n = int(input())
a = []
for i in range(n):
	a.append(input())
a = str(a)
print((a.count('+') - a.count('-')) // 2)


s = int(input())
x = 0
for i in range(s):
	var = input()
	if var[1] == '+':
		x += 1
	if var[1] == '-':
		x -= 1
print(x)


sum = 0
for _ in [0] * int(input()):
	if '+' in input():
		sum += 1
	else:
		sum -= 1
print(sum)


import sys

def main():
	x = 0
	for i in range(0, int(input())):
		if '+' in input():
			x += 1
		else:
			x -= 1
	print(x)
main()


a = int(input())
X = 0
for i in range(a):
	cmd = str(input())
	if cmd == 'X++':
		cmd = 'X+=1'
	elif cmd == '++X':
		cmd = 'X+=1'
	elif cmd == '--X':
		cmd = 'X-=1'
	else:
		cmd = 'X -=1'
	exec(cmd)
print(X)


n = int(input())
k = 0
for i in range(0, n):
	c = input()
	flag = 1
	if c.find('-') != -1:
		k -= 1
	else:
		k += 1
print(k)


val = 0
for _ in range(int(input())):
	str_ = input()
	if str_ == '++X' or str_ == 'X++':
		val += 1
	elif str_ == '--X' or str_ == 'X--':
		val -= 1
print(val)


T = int(input().strip())
X = 0
for _ in range(0, T):
	str = input().strip()
	if str[0:2] == '++':
		X += 1
	elif str[0:2] == '--':
		X -= 1
	elif str[0] == 'X':
		if str[1:] == '++':
			X += 1
		elif str[1:] == '--':
			X -= 1
print(X)


n = int(input())
result = 0
for i in range(n):
	term = str(input())
	if '++' in term:
		result += 1
	elif '--' in term:
		result -= 1
print(result)


t = int(input())
X = 0
while t:
	op = input()
	if op[0] == 'X':
		if op[1:] == '++':
			X += 1
		else:
			X -= 1
	elif op[0:2] == '++':
		X += 1
	else:
		X -= 1
	t -= 1
print(X)


n = int(input())
total = 0
for x in range(n):
	string = input()
	if string.find('--') != -1:
		total -= 1
	else:
		total += 1
print(total)


count = int(input())
x = 0
sent = []
while count > 0:
	sent.append(input())
	count -= 1
for s in sent:
	if '++' in s:
		x += 1
	else:
		x -= 1
print(x)


x = int(input())
z = 0
while x > 0:
	y = input()
	if y[1] == '+':
		z += 1
	elif y[1] == '-':
		z -= 1
	x -= 1
print(z)


line = int(input())
ans = 0
for i in range(line):
	statements = input()
	if statements == '++X' or statements == 'X++':
		ans = ans + 1
	elif statements == '--X' or statements == 'X--':
		ans = ans - 1
print(ans)


n = int(input())
counter = 0
i = 0
add = '++'
sub = '--'
while i < n:
	c = input()
	i += 1
	if add in c:
		counter = counter + 1
	if sub in c:
		counter = counter - 1
print(counter)


n = int(input())
x = 0
while n:
	(a, b, c) = map(str, input().strip())
	if b == '+':
		x += 1
	else:
		x -= 1
	n -= 1
print(x)


n = int(input())
cnt1 = 0
for i in range(n):
	a = input()
	cnt = a.count('+')
	if cnt > 0:
		cnt1 += 1
	else:
		cnt1 = cnt1 - 1
	cnt = 0
print(cnt1)


i = input()
j = int(i)
string = []
minus1 = '--X'
minus2 = 'X--'
add1 = 'X++'
add2 = '++X'
count = 0
count2 = 0
for x in range(j):
	string.append(input())
for x in range(j):
	if add1 in string[x] or add2 in string[x]:
		count += 1
	elif minus1 in string[x] or minus2 in string[x]:
		count -= 1
print(count)


n = int(input())
i = 1
x = 0
while i <= n:
	inp = input()
	if str('+' in inp) == 'True':
		x += 1
	else:
		x -= 1
	i += 1
print(x)


n = int(input())
problems = []
for i in range(n):
	problems.append(input())
value = 0
for i in range(len(problems)):
	if '+' in problems[i]:
		value += 1
	else:
		value -= 1
print(value)


n = int(input(''))
valor = ''
x = 0
for cada in range(n):
	valor = input('')
	if valor[0] == '+' or valor[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


cases = int(input())
x = 0
for i in range(cases):
	op = input()
	l = len(op)
	if op[0] == '+' or op[l - 1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
rezult = 0
commands = []
for i in range(n):
	commands.append(input())
for i in commands:
	if '+' in i:
		rezult += 1
	else:
		rezult -= 1
print(rezult)


a = int(input())
i = 0
g = 0
while i < a:
	i = i + 1
	b = input()
	if str(b) == 'X++' or str(b) == '++X':
		g += 1
	elif str(b) == 'X--' or str(b) == '--X':
		g -= 1
print(int(g))


i = int(input())
c = 0
for j in range(i):
	a = input().lower()
	if a == '++x' or a == 'x++':
		c += 1
	elif a == '--x' or a == 'x--':
		c -= 1
print(c)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
n = inp()
x = 0
while n != 0:
	data = insr()
	count_plus = len([i for i in data if i == '+'])
	if count_plus == 2:
		x = x + 1
		n = n - 1
		continue
	else:
		count_moins = len([i for i in data if i == '-'])
		if count_moins == 2:
			x = x - 1
			n = n - 1
			continue
print(x)


l = list()
for i in range(int(input())):
	l.append(input())
x = 0
for i in l:
	if i == '++X' or i == 'X++':
		x += 1
	elif i == '--X' or i == 'X--':
		x -= 1
	else:
		x
print(x)


import sys
n = int(sys.stdin.readline())
total = 0
for loop in range(n):
	string = sys.stdin.readline()
	if string[0] == '-' or string[2] == '-':
		total -= 1
	else:
		total += 1
print(total)


count = int(input())
n = 0
for i in range(count):
	str_input = str(input())
	if str_input[0] == 'X':
		str_input = str_input[1:]
	else:
		str_input = str_input[:-1]
	if str_input == '++':
		n += 1
	else:
		n -= 1
print(n)


x = int(input())
dec = 0
for i in range(x):
	string = input()
	if string == 'X++' or string == '++X':
		dec += 1
	elif string == 'X--' or string == '--X':
		dec -= 1
print(dec)


t = int(input())
count = 0
for i in range(t):
	s = input().strip()
	if '++' in s:
		count += 1
	else:
		count -= 1
print(count)


s = int(input())
list = []
k = 0
if 1 <= s <= 150:
	for i in range(s):
		list.append(str(input()))
for v in list:
	if v == '++X' or v == 'X++':
		k += 1
	elif v == '--X' or v == 'X--':
		k -= 1
print(k)


n = input()
i = 0
m = []
while i < int(n):
	m.append(str(input()))
	i += 1
x = 0
for q in m:
	if q == '--X' or q == 'X--':
		x -= 1
	elif q == 'X++' or q == '++X':
		x += 1
print(x)


res = 0
for i in range(int(input())):
	oper = input()
	if '+' in oper:
		res += 1
	if '-' in oper:
		res -= 1
print(res)


n = int(input())
x = 0
counter = 0
while n > counter:
	myStr = input()
	if myStr[1] == '+':
		x += 1
	else:
		x -= 1
	counter += 1
print(x)


n = int(input())
vivod = 0
i = 0
while i < n:
	stroka = input()
	if stroka[1] == '+':
		vivod += 1
	else:
		vivod -= 1
	i += 1
print(vivod)


n = int(input())
x = 0
for y in range(n):
	inp_str = input()
	if '+' in inp_str:
		x += 1
	elif '-' in inp_str:
		x -= 1
print(x)


nb = int(input())
x = 0
for i in range(0, nb):
	ans = input()
	if ans == 'X++' or ans == '++X':
		x = x + 1
	else:
		x = x - 1
print(x)


X = 0
line = int(input())
for i in range(line):
	comm = input()
	if comm == '++X' or comm == 'X++':
		X += 1
	else:
		X -= 1
print(X)


from sys import stdin, stdout
n = int(stdin.readline())
x = 0
for z in range(n):
	stroka = stdin.readline()
	if '++' in stroka:
		x += 1
	elif '--' in stroka:
		x -= 1
print(x)


a = int(input())
c = '-'
d = '+'
f = 0
for i in range(a):
	b = input()
	if c in b:
		f -= 1
	elif d in b:
		f += 1
	else:
		continue
print(f)


def isincrement(a):
	l = ['X++', '++X']
	return a in l
n = int(input())
lst = []
c = 0
for i in range(n):
	lst.append(str(input()))
for (i, j) in enumerate(lst):
	if isincrement(j):
		c += 1
	else:
		c -= 1
print(c)


n = int(input())
coun = 0
for i in range(n):
	a = input()
	x = a.count('+')
	y = a.count('-')
	coun += x // 2
	coun -= y // 2
print(coun)


numi = int(input())
x = 0
y = 0
while y < numi:
	cn = input()
	if cn.lower() == 'x++' or cn.lower() == '++x':
		y = y + 1
		x = x + 1
	elif cn.lower() == 'x--' or cn.lower() == '--x':
		y = y + 1
		x = x - 1
	else:
		print('Wrong Input')
print(x)


a = int(input())
num = 0
result = 0
while num < a:
	statement = input()
	num += 1
	if statement == '++X' or statement == 'X++':
		result += 1
	elif statement == '--X' or statement == 'X--':
		result -= 1
print(result)


t = int(input())
cnt = 0
for i in range(t):
	s = input()
	if s[0] == '+' or s[-1] == '+':
		cnt += 1
	else:
		cnt -= 1
print(cnt)


t = int(input())
count = 0
while t > 0:
	t -= 1
	m = input()
	if '+' in m:
		count += 1
	else:
		count -= 1
print(count)


t = int(input())
x = 0
for i in range(t):
	a = input().strip()
	if '++' in a:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
value = 0
while n:
	string = str(input())
	if '++' in string:
		value += 1
	elif '--' in string:
		value -= 1
	n -= 1
print(value)


loop = int(input())
answer = 0
for i in range(loop):
	s = str(input())
	if s[0:1] == '+' or s[1:2] == '+':
		answer += 1
	elif s[0:1] == '-' or s[1:2] == '-':
		answer -= 1
print(answer)


import re
n = int(input())
x = 0
if 1 <= n <= 150:
	for i in range(n):
		s = str(input())
		if re.findall('\\S[+]', s):
			x += 1
		if re.findall('\\S[-]', s):
			x -= 1
print(x)


val = input('')
n = int(val)
x = 0
i = 0
while i < n:
	var = input('')
	if var == 'X++':
		x = x + 1
	elif var == '++X':
		x = x + 1
	elif var == '--X':
		x = x - 1
	elif var == 'X--':
		x = x - 1
	i = i + 1
print(x)


entries = int(input())
val = 0
for i in range(entries):
	user = [str(j) for j in input()]
	if user[0] == '+' and user[1] == '+':
		val += 1
	elif user[0] == '-' and user[1] == '-':
		val -= 1
	elif user[1] == '+' and user[2] == '+':
		val += 1
	elif user[1] == '-' and user[2] == '-':
		val -= 1
print(val)


z = 0
for d in range(int(input())):
	inp = input()
	if inp == '++X' or inp == 'X++':
		z += 1
	elif inp == '--X' or inp == 'X--':
		z += -1
print(z)


t = int(input())
a = 0
for _ in range(t):
	s = input()
	if s[0] == '-' or s[1] == '-':
		a -= 1
	else:
		a += 1
print(a)


in_num = int(input())
initial = 0
for loop in range(0, in_num):
	temp = input()
	if '+' in temp:
		initial += 1
	elif '-' in temp:
		initial -= 1
print(initial)


local = False
if local:
	file = open('A.txt', 'r')

def inp():
	if local:
		return file.readline().rstrip()
	else:
		return input().rstrip()

def ints():
	return [int(_) for _ in inp().split()]
n = int(inp())
ans = 0
for _ in range(n):
	if '++' in inp():
		ans += 1
	else:
		ans -= 1
print(ans)


a = int(input())
p = 0
m = 0
for n in range(a):
	pm = str(input())
	p = p + pm.count('++')
	m = m + pm.count('--')
print(p - m)


import math
import sys

def bit():
	datain = []
	number = 0
	for i in range(int(input())):
		datain.append(input())
	for i in datain:
		if '-' in i:
			number -= 1
		else:
			number += 1
	print(number)
bit()


n = int(input())
c = 0
for i in range(n):
	s = input()
	if s.lower() == '++x' or s.lower() == 'x++':
		c = c + 1
	elif s.lower() == '--x' or s.lower() == 'x--':
		c = c - 1
	s = 0
print(c)


import sys
import math
numberOfStatements = int(sys.stdin.readline().rstrip())
x = 0
for statement in sys.stdin:
	if statement[0] == '+' or statement[-2] == '+':
		x += 1
	elif statement[0] == '-' or statement[-2] == '-':
		x -= 1
print(x)


(n, lst, v) = (int(input()), [], 0)
for i in range(n):
	lst.append(0)
	lst[i] = input()
for i in range(n):
	if lst[i] == 'X++' or lst[i] == '++X':
		v += 1
	if lst[i] == 'X--' or lst[i] == '--X':
		v -= 1
print(v)


import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
N = int(input())
ans = 0
for i in range(N):
	s = input()
	if s.find('++') >= 0:
		ans += 1
	else:
		ans -= 1
print(ans)


num_stats = int(input())
statements = [input() for i in range(num_stats)]
num = 0
for i in statements:
	if '+' in i:
		num += 1
	if '-' in i:
		num -= 1
print(num)


n = input()
summ = int()
for i in range(int(n)):
	string = str(input())
	if string[0] == '-' or string[1] == '-' or string[2] == '-':
		summ = summ - 1
	else:
		summ = summ + 1
print(summ)


import sys
n = int(input())
x = 0
for i in range(n):
	line = input()
	if 'X' in line:
		if '++' in line:
			x += 1
		elif '--' in line:
			x -= 1
print(x)


n = int(input())
s = 0
for i in range(n):
	x = input()
	k = 0
	for j in range(3):
		if x[j] == '+':
			k += 1
	if k == 2:
		s += 1
	else:
		s -= 1
print(s)


from sys import stdin
n = int(stdin.readline())
x = 0
while n > 0:
	cur = stdin.readline().rstrip()
	if cur[0] == '-' or cur[-1] == '-':
		x -= 1
	else:
		x += 1
	n -= 1
print(x)


import sys
t = int(sys.stdin.readline().strip())
n = 0
while t > 0:
	s = sys.stdin.readline().strip()
	if s == '++X' or s == 'X++':
		n += 1
	else:
		n -= 1
	t -= 1
print(n)


X = 0
n = int(input())
i = 0
while i < n:
	operation = input('')
	if operation == '++X' or operation == 'X++':
		X += 1
	elif operation == '--X' or operation == 'X--':
		X -= 1
	i += 1
print(X)


n = int(input())
count = 0
plus = ['+']
minus = ['-']
for i in range(n):
	l = input()
	for i in l:
		if i in plus:
			count += 1
			break
		if i in minus:
			count -= 1
			break
print(count)


import sys, math
from collections import deque, defaultdict
import operator as op
from functools import reduce
sys.setrecursionlimit(10 ** 6)
I = sys.stdin.readline

def ii():
	return int(I().strip())

def li():
	return list(map(int, I().strip().split()))

def mi():
	return map(int, I().strip().split())

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def divi(n):
	ans = []
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			ans.append((i, n // i))
	return ans

def main():
	x = 0
	for _ in range(ii()):
		s = I().strip()
		if s == '++X' or s == 'X++':
			x += 1
		else:
			x -= 1
	print(x)
main()


num = int(input())
listi = []
for i in range(num):
	i = input()
	listi = listi + [i]
x = 0
for sr in listi:
	if sr == 'X++' or sr == '++X':
		x = x + 1
	else:
		x = x - 1
print(x)


sum = 0
n = int(input())
for i in range(0, n, 1):
	t = input().upper()
	if 'X++' in t:
		sum = sum + 1
	elif 'X--' in t:
		sum = sum - 1
	elif '--X' in t:
		sum = sum - 1
	elif '++X' in t:
		sum = sum + 1
print(sum)


n = int(input())
e = 0
for x in range(n):
	scan = input()
	if '++' in scan:
		e += 1
	else:
		e -= 1
print(e)


result = 0
for _ in range(int(input())):
	result += 1 if input().find('++') > -1 else -1
print(result)


n = int(input())
A = []
for i in range(n):
	O = input()
	A.append(O)
X = 0
for i in A:
	if i == '++X' or i == '+X+' or i == 'X++':
		X = X + 1
	elif i == '--X' or i == 'X--' or i == '-X-':
		X = X - 1
print(X)


n = int(input())
sum = 0
for i in range(n):
	a = input()
	b = a.strip('X')
	if b == '++':
		sum += 1
	else:
		sum += -1
print(sum)


v = int(input())
c = 0
i = 0
while i < v:
	w = input()
	if w == 'X++' or w == '++X':
		c += 1
	elif w == '--X' or w == 'X--':
		c = c - 1
	i = i + 1
print(c)


def main():
	n = int(input(''))
	x = 0
	while n > 0:
		xproc = input('')
		if xproc.find('+') != -1:
			x = x + 1
		else:
			x = x - 1
		n = n - 1
	print(x)
main()


nstm = int(input())
op = []
for i in range(nstm):
	opi = input()
	op.append(opi)
x = 0
for u in range(nstm):
	if op[u] == 'X++' or op[u] == '++X':
		x += 1
	elif op[u] == 'X--' or op[u] == '--X':
		x -= 1
	else:
		x = x / 0
print(x)


n = int(input())
x = 0
for tc in range(n):
	s = input()
	if s == '++X' or s == 'X++':
		x += 1
	if s == '--X' or s == 'X--':
		x -= 1
print(x)


numberofoperations = input()
string = []
answer = 0
for i in range(int(numberofoperations)):
	operation = input()
	string.append(operation)
for j in range(int(numberofoperations)):
	if '++' in string[j]:
		answer += 1
	else:
		answer -= 1
print(answer)


a = int(input(''))
an = 0
bn = 0
for i in range(0, a):
	i = list(map(str, input()))
	for b in i:
		if b == '+':
			an += 1
		elif b == '-':
			bn += 1
ant = an // 2
bnt = bn // 2
d = ant - bnt
print(d)


n = int(input())
x = 0
for i in range(n):
	sign = str(input())
	if sign[0] == '+' or sign[-1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
X = 0
for i in range(n):
	ch = input()
	L = list(ch)
	if '+' in L:
		X += 1
	elif '-' in L:
		X = X - 1
print(X)


n = int(input())
res = 0
for i in range(n):
	x = list(map(str, input()))
	if '+' in x:
		res += 1
	else:
		res -= 1
print(res)


sum1 = 0
for item in [0] * int(input()):
	y = int(input().count('+'))
	if y > 0:
		sum1 = sum1 + 1
	else:
		sum1 = sum1 - 1
print(sum1)


line = int(input())
tmp = 0
sum = 0
for i in range(line):
	statement = input()
	if statement.count('++') == 1:
		sum = sum + 1
	elif statement.count('--') == 1:
		sum = sum - 1
	else:
		pass
print(sum)


n = int(input().split()[0])
L = []
x = 0
for i in range(n):
	L.append(input().split()[0])
for elt in L:
	if elt == '++X' or elt == 'X++':
		x += 1
	else:
		x -= 1
print(x)


no_lines = int(input())
X = 0
ind = 0
sen = ''
for i in range(no_lines):
	sen += input() + '\n'
	if sen.split()[ind] == 'X++' or sen.split()[ind] == '++X':
		X += 1
	elif sen.split()[ind] == 'X--' or sen.split()[ind] == '--X':
		X -= 1
	ind += 1
print(X)


sequence = [input() for i in range(int(input()))]
plus = sequence.count('X++') + sequence.count('++X')
minus = sequence.count('X--') + sequence.count('--X')
print(plus - minus)


def bit():
	N = input()
	count = 0
	for i in range(int(N)):
		a = input()
		if a == '+X+' or a == '++X' or a == 'X++':
			count += 1
		elif a == '-X-' or a == '--X' or a == 'X--':
			count -= 1
	print(str(count))
bit()


n = int(input())
x = 0
for l in range(n):
	oprator = input()
	if oprator == 'X++' or oprator == '++X':
		x += 1
	elif oprator == 'X--' or oprator == '--X':
		x -= 1
print(x)


t = int(input())
val = 0
for i in range(0, t):
	op = input()
	if '+' in op:
		val += 1
	else:
		val -= 1
print(val)


n = int(input())
sum_0 = 0
for i in range(n):
	tmp = input()
	for j in range(2):
		if tmp[j] == '-':
			sum_0 -= 1
			break
		elif tmp[j] == '+':
			sum_0 += 1
			break
print(sum_0)


import sys
n = int(sys.stdin.readline())
x = 0
for _ in range(n):
	temp = sys.stdin.readline()
	if '+' in temp:
		x += 1
	else:
		x -= 1
print(x)


k = int(input())
ans = 0
for i in range(k):
	x = input()
	if x[1] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
x = 0
for i in range(n):
	m = input().lower()
	if m == 'x++' or m == '++x':
		x += 1
	else:
		x -= 1
print(x)


no = int(input())
x = 0
plus = False
minus = False
for i in range(no):
	st = input()
	if plus == True:
		x += 1
		plus = False
	if minus == True:
		x -= 1
		minus = False
	if st[0] == '+':
		x += 1
	elif st[0] == '-':
		x -= 1
	elif st[2] == '+':
		plus = True
	else:
		minus = True
if plus == True:
	x += 1
if minus == True:
	x -= 1
print(x)


x = 0
for _ in range(int(input())):
	op = input()
	if op.endswith('++') or op.startswith('++'):
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = int(0)
for y in range(n):
	w = input()
	arr = []
	if w[0] == '+' or w[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
arr = []
X = 0
for i in range(1, n + 1):
	arr.append(input())
for operation in arr:
	if operation[0] == operation[1]:
		if operation[0] == '+':
			X += 1
		elif operation[0] == '-':
			X -= 1
	if operation[-1] == operation[-2]:
		if operation[-1] == '+':
			X += 1
		elif operation[-1] == '-':
			X -= 1
print(X)


from sys import stdin, stdout
string = stdin.readline().strip()
x = 0
while string:
	for i in range(len(string) - 1):
		if string[i] == '+':
			if string[i + 1] == '+':
				x += 1
		if string[i] == '-':
			if string[i + 1] == '-':
				x -= 1
	string = stdin.readline().strip()
stdout.write(str(x))


x = int(input())
a = 0
for i in range(1, x + 1):
	s = input()
	for m in s:
		if m == '+':
			a += 1 / 2
		elif m == '-':
			a -= 1 / 2
		else:
			a = a
a = str(a)
a = a[0:-2]
print(a)


n = int(input())
x = 0
while n > 0:
	str = input().strip()
	if str[0] == '+' or str[1] == '+' or str[2] == '+':
		x += 1
	else:
		x -= 1
	n -= 1
print(x)


l = int(input())
m = []
for i in range(l):
	m.append(list(input()))
x = 0
for i in range(l):
	if '+' in m[i]:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
c = 0
while n > 0:
	s = input()
	if s[0] == '+' or s[1] == '+':
		c += 1
	else:
		c -= 1
	n -= 1
print(c)


n = input('')
n = int(n)
i = 0
count = 0
while i < n:
	word = input('')
	if word == 'X++':
		count = count + 1
	elif word == '++X':
		count = count + 1
	else:
		count = count - 1
	i = i + 1
print(count)


no_st = int(input())
x = 0
for i in range(no_st):
	st = input()
	if st[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
cnt = 0
tot = []
for p in range(n):
	l = input()
	if l == 'X++' or l == '++X' or l == '+X+':
		x += 1
	elif l == '--X' or l == 'X--' or l == '-X-':
		x -= 1
print(x)


num = int(input())
list = []
for i in range(num):
	list.append(input())
x = 0
for i in list:
	if '+' in i:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for i in range(n):
	s = input()
	flag = 0
	for j in s:
		if j == '+':
			flag = 1
		if j == '-':
			flag = -1
	x = x + flag
print(x)


n = int(input())
valeur = 0
for x in range(n):
	operation = input()
	if operation.find('++') >= 0:
		valeur += 1
	elif operation.find('--') >= 0:
		valeur -= 1
print(valeur)


n = int(input())
result = 0
for i in range(n):
	temp = input()
	if temp == '++X' or temp == 'X++':
		result += 1
	elif temp == '--X' or temp == 'X--':
		result -= 1
print(result)


n = int(input())
y = 0
if n >= 1 and n <= 150:
	for i in range(n):
		x = str(input())
		x = x.lower()
		if x == 'x++' or x == '++x':
			y += 1
		else:
			y -= 1
print(y)


x = 0
for l in [0] * int(input()):
	s = input()
	n = len(s) - 1
	if s[0] == '+' or s[n] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
ans = 0
for s in range(0, n):
	y = input()
	if y[0] == 'X':
		if y[-1] == '+':
			ans += 1
		else:
			ans -= 1
	elif y[0] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
dictin = {'X++': 1, '++X': 1, '--X': -1, 'X--': -1}
l = []
while len(l) != n:
	s = str(input())
	l.append(dictin[str(s)])
print(sum(l))


t = int(input())
ans = 0
while t > 0:
	x = input()
	if x.find('+') != -1:
		ans += 1
	else:
		ans -= 1
	t -= 1
print(ans)


test = int(input())
res = 0
for i in range(test):
	c = input()
	if c.count('+') == 2:
		res += 1
	else:
		res -= 1
print(res)


num = int(input())
res = 0
for i in range(num):
	a = input()
	if a[0] == '+' or a[-1] == '+':
		res += 1
	else:
		res -= 1
print(res)


import math
import os
import random
import re
import sys
n = int(input())
x = 0
for i in range(0, n):
	s = input()
	if s == '++X' or s == 'X++':
		x += 1
	else:
		x -= 1
print(x)


flag = 0
sum1 = 0
n = int(input(' '))
for i in range(0, n):
	x = input(' ')
	if x == 'X++' or x == '++X':
		flag = 1
	elif x == '--X' or x == 'X--':
		flag = -1
	sum1 = sum1 + flag
print(sum1)


x = int(input())
count = 0
a = ['X++', '++X']
for i in range(x):
	if input() in a:
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
total = 0
for i in range(n):
	y = input()
	if y == 'X++' or y == '++X':
		total += 1
	elif y == 'X--' or y == '--X':
		total -= 1
print(total)


n = int(input())
x = 0
while n > 0:
	n -= 1
	l = input()
	x += 1 if l[1] == '+' else -1
print(str(x))


X = 0
inputrtrt = int(input())
for i in range(inputrtrt):
	inputrt = input()
	if inputrt == 'X++' or inputrt == '++X':
		X = X + 1
	if inputrt == 'X--' or inputrt == '--X':
		X = X - 1
print(X)


s = int(input())
count = 0
for _ in range(s):
	d = input()
	if d.find('-') != -1:
		count -= 1
	else:
		count += 1
print(count)


g = 0
t = int(input())
i = 0
while i < t:
	i += 1
	x = list(str(input()))
	if int(x.count('+')) == 2:
		g += 1
	else:
		g -= 1
print(g)


t = []
x = 0
n = int(input())
for i in range(n):
	t.append(input())
str(t)
for i in t:
	c = 0
	for j in i:
		if i[c:c + 2] == '++':
			x = x + 1
		if i[c:c + 2] == '--':
			x = x - 1
		c = c + 1
print(x)


nl = int(input().strip())
x = 0
for i in range(nl):
	stmt = input().strip()
	if '+' in stmt:
		x = x + 1
	elif '-' in stmt:
		x = x - 1
	else:
		continue
print(x)


n = int(input())
s = 3
value = float(0)
for i in range(n):
	seq = str(input())
	for j in range(s):
		if seq[j] == '+':
			value += 0.5
		if seq[j] == '-':
			value -= 0.5
		else:
			value = value
print(int(value))


ilo = int(input())
X = 0
for i in range(ilo):
	tmp = input()
	if tmp[0] == '-' or tmp[1] == '-':
		X -= 1
	else:
		X += 1
print(X)


n = int(input())
for i in range(n):
	if '+' in input():
		n -= 2
print(-n)


n = int(input())
a = 0
count = 0
while a < n:
	state = input()
	if '+' in state:
		count += 1
	if '-' in state:
		count -= 1
	a += 1
print(count)


number = int(input())
count = 0
for index in range(number):
	statement = input()
	if '+' in statement:
		count += 1
	else:
		count -= 1
print(count)


x = 0
n = int(input())
programme = list()
for s in range(0, n):
	statement = str(input())
	programme.append(statement)
for statement in programme:
	if '++' in statement:
		x += 1
	elif '--' in statement:
		x -= 1
print(x)


n = int(input())
i = 0
res = 0
while i < n:
	i += 1
	if input().__contains__('-'):
		res -= 1
	else:
		res += 1
print(res)


n = input()
i = 1
sum = 0
while i <= int(n):
	operation = input()
	if '++' in operation:
		sum += 1
	elif '--' in operation:
		sum -= 1
	i += 1
print(sum)


n = int(input())
k = 0
plus = ['X++', '++X']
minus = ['X--', '--X']
for i in range(n):
	str = input()
	if str in plus:
		k += 1
	if str in minus:
		k = k - 1
print(k)


n = int(input())
ls = []
for _ in range(n):
	m = input()
	ls.append(m)
a = ls.count('++X') + ls.count('X++')
b = -(ls.count('--X') + ls.count('X--'))
print(a + b)


p = int(input())
count = 0
for i in range(p):
	st = input()
	if st[:] == 'X++' or st[:] == '++X':
		count = count + 1
	else:
		count = count - 1
print(count)


n = int(input())
result = 0
for i in range(n):
	a = input()
	if '++' in a:
		result = result + 1
	if '--' in a:
		result = result - 1
print(result)


from sys import stdin

def main():
	a = stdin.readline().strip()
	while a != '':
		a = int(a)
		x = 0
		for i in range(a):
			if '+' in stdin.readline():
				x += 1
			else:
				x -= 1
		print(x)
		a = stdin.readline().strip()
main()


numOfLines = int(input())
lst = []
for i in range(numOfLines):
	lst.append(input())
val = 0
for i in lst:
	if '+' in i:
		val += 1
	else:
		val -= 1
print(val)


kol = int(input())
ans = 0
for j in range(kol):
	a = str(input())
	if a == '++X':
		ans += 1
	if a == 'X++':
		ans += 1
	if a == '++x':
		ans += 1
	if a == 'x++':
		ans += 1
	if a == '--X':
		ans -= 1
	if a == 'X--':
		ans -= 1
	if a == '--x':
		ans -= 1
	if a == 'x--':
		ans -= 1
print(ans)


n = int(input())
x = 0
for u in range(n):
	inp = input()
	k = inp.replace('X', '')
	if k[0] == '+':
		x += 1
	else:
		x -= 1
print(x)


count = int(input())
rules = []
for x in range(0, count):
	rules.append(input().split('\n'))
a = 0
for i in rules:
	st = str(i)
	if '++' in st.rstrip('X'):
		a += 1
	elif '--' in st.rstrip('X'):
		a -= 1
print(a)


n = int(input())
e = 0
for i in range(0, n):
	ch = str(input())
	if ch == 'X++' or ch == '++X':
		e += 1
	elif ch == 'X--' or ch == '--X':
		e -= 1
print(e)


x = int(input())
l = []
for i in range(x):
	y = input()
	l.append(y)
s = 0
for j in l:
	if '+' in j:
		s += 1
	else:
		s -= 1
print(s)


n_sentences = int(input())
x = 0
for i_sentence in range(n_sentences):
	sentence = input()
	if '+' in sentence:
		x += 1
	else:
		x -= 1
print(x)


while True:
	n = int(input())
	if n >= 1 and n <= 150:
		break
x = 0
for i in range(n):
	while True:
		ch = input()
		if (ch[0:2] == '++' or ch[0:2] == '--' or ch[1:3] == '++' or (ch[1:3] == '--')) and (ch[0] == 'X' or ch[2] == 'X'):
			break
	if ch[0:2] == '++' or ch[1:3] == '++':
		x += 1
	else:
		x = x - 1
print(x)


n = int(input())
if n >= 1 and n <= 150:
	hasil = 0
	for i in range(n):
		masukan = input()
		penentu1 = 0
		penentu2 = 0
		for j in masukan:
			if j == '+':
				penentu1 += 1
			elif j == '-':
				penentu2 += 1
		if penentu1 == 2:
			hasil += 1
		else:
			hasil -= 1
	print(hasil)


a = int(input())
x = 0
for i in range(a):
	s = input()
	if s == '++X' or s == 'X++':
		x = x + 1
	elif s == '--X' or s == 'X--':
		x = x - 1
	else:
		print('Syntax Error!')
print(x)


n = int(input())
plus = '++'
mi = '--'
t = 0
for i in range(0, n):
	s = input()
	if plus in s:
		t += 1
	if mi in s:
		t -= 1
print(t)


ctr = 0
x = int(input())
while x > 0:
	a = input()
	if '++' in a:
		ctr += 1
	else:
		ctr -= 1
	x -= 1
print(ctr)


print(sum([1 if input() in ('X++', '++X') else -1 for _ in range(int(input()))]))


m = int(input())
x = 0
while m > 0:
	s = input()
	if '-' in s:
		x -= 1
	else:
		x += 1
	m -= 1
print(x)


n = int(input())
x = 0
for i in range(n):
	t = input()
	if t[0] != 'X':
		x += t[0] == '+'
	else:
		x += t[2] == '+'
print(2 * x - n)


n = int(input())
x = 0
arr = []
for i in range(n):
	arr.append(str(input()))
for i in arr:
	if i[:2] == '++' or i[1:] == '++':
		x += 1
	else:
		x -= 1
print(x)


print(sum((44 - ord(input()[1]) for _ in range(int(input())))))


k = int(input())
x = 0
for i in range(k):
	c = 0
	n = input()
	for l in n:
		if l == 'X':
			c = c + 1
	for l in n:
		if l == '+' and c == 1:
			x = x + 0.5
		if l == '-' and c == 1:
			x = x - 0.5
print(int(x))


a = 0
l = [input() for i in range(int(input()))]
for i in l:
	if i[-1] == 'X' and i[0] == '+' or (i[-1] == '+' and i[0] == 'X'):
		a += 1
	else:
		a -= 1
print(a)


def solve(n, s):
	x = 0
	for i in s:
		if '+' in i:
			x += 1
		else:
			x -= 1
	return x

def main():
	n = int(input())
	s = [input() for _ in range(n)]
	print(solve(n, s))
main()


def commander(commands):
	x = 0
	for i in commands:
		if '++' in i:
			x += 1
		else:
			x -= 1
	return x
times = int(input())
commands = []
for _ in range(times):
	commands.append(input())
print(commander(commands))


n = int(input())
counter = 0
for i in range(n):
	op = input()
	if op == '++X' or op == 'X++':
		counter += 1
	else:
		counter -= 1
print(counter)


__author__ = 'Asm0d3us'

def main():
	val = 0
	n = int(input())
	for i in range(0, n):
		status = input()
		if '+' in status:
			val += 1
		else:
			val -= 1
	return val
print(main())


import math
size = input()
x = 0
for i in range(int(size)):
	row = input()
	row = row.lower()
	if row.count('x') > 0:
		if row.count('+') == 2:
			x += 1
		elif row.count('-') == 2:
			x -= 1
print(x)


n = int(input())
I = []
for i in range(n):
	k = input()
	I.append(k)
x = 0
for i in I:
	if i == 'X++' or i == '++X':
		x += 1
	else:
		x -= 1
print(x)


set_n = int(input())
operation_list = []
for step in range(set_n):
	operation_list += [input()]
x = 0
for operation in operation_list:
	if '+' in operation:
		x += 1
	else:
		x -= 1
print(x)


a = 0
y = int(input())
for ctr in range(0, y):
	x = input()
	if x == '++X' or x == 'X++':
		a = a + 1
	elif x == '--X' or x == 'X--':
		a = a - 1
print(a)


n = int(input())
counter = 0
for i in range(n):
	seq = input()
	a = seq.count('+')
	b = seq.count('-')
	if a == 2:
		counter += 1
	if b == 2:
		counter -= 1
print(counter)


n = int(input())
x = 0
for i in range(n):
	line = input()
	if line[0] == '+' and line[1] == '+' and (line[2] == 'X'):
		x += 1
	elif line[0] == 'X' and line[1] == '+' and (line[2] == '+'):
		x += 1
	elif line[0] == '-' and line[1] == '-' and (line[2] == 'X'):
		x -= 1
	elif line[0] == 'X' and line[1] == '-' and (line[2] == '-'):
		x -= 1
print(x)


amount_of_operations = int(input())
counter = 0
for i in range(amount_of_operations):
	j = input()
	if j[0] == '-':
		counter -= 1
	elif j[0] == '+':
		counter += 1
	elif j[1] == '-':
		counter -= 1
	elif j[1] == '+':
		counter += 1
print(counter)


import re
result = 0
for _ in range(int(input())):
	s = input()
	if re.search('[-]{2}', s):
		result -= 1
	if re.search('[+]{2}', s):
		result += 1
print(result)


c = []
x = 0
for i in range(int(input())):
	c.append(input())
for i in range(len(c)):
	if '++' in c[i]:
		x = x + 1
	if '--' in c[i]:
		x = x - 1
print(x)


n = int(input())
l = []
for _ in range(n):
	l.append(input())
i = len([x for x in l if '+' in x])
print(2 * i - n)


import sys
n = int(input())
result = 0
for i in range(0, n, 1):
	astring = str(input())
	if astring[1] == '+':
		result += 1
	else:
		result -= 1
print('%i' % result)


n = int(input())
res = 0
for i in range(n):
	my_str = list(input())
	if my_str[1] == '-':
		res -= 1
	else:
		res += 1
print(res)


Licznik = 0
Ile = int(input())
for i in range(Ile):
	Ciag = input()
	if Ciag[1] == '+':
		Licznik += 1
	else:
		Licznik -= 1
print(Licznik)


t = int(input())
ans = 0
for _ in range(t):
	n = list(input())
	n.sort()
	if n[1] == '+':
		ans += 1
	elif n[1] == '-':
		ans -= 1
print(ans)


a = int(input())
b = 0
for i in range(a):
	a_i = input()
	if '++' in a_i:
		b += 1
	if '--' in a_i:
		b -= 1
print(b)


(count1, count2) = (0, 0)
for _ in range(int(input())):
	a = list(map(str, input()))
	if a[1] == '+':
		count1 += 1
	elif a[1] == '-':
		count2 += 1
print(count1 - count2)


def Main():
	n = int(input())
	x = 0
	for i in range(0, n):
		s = input()
		x = x + 1 if '++' in s else x - 1
	print(x)
Main()


g = int(input())
list = []
b = 0
for k in range(0, g):
	exp = input()
	list.append(exp)
for l in range(0, len(list)):
	if list[l] == '++X' or list[l] == 'X++':
		b = b + 1
	else:
		b = b - 1
print(b)


n = int(input())
ans = 0
while n > 0:
	askii = []
	state = input()
	for i in range(3):
		askii.append(ord(state[i]))
	if askii[0] == 43 or askii[2] == 43:
		ans = ans + 1
	elif askii[0] == 45 or askii[2] == 45:
		ans = ans - 1
	n = n - 1
print(ans)


print(sum(map(lambda x: 1 if '+' in x else -1, (input() for i in range(int(input()))))))


p = int(input())
b = 0
for i in range(p):
	v = input()
	if '++' in v:
		b = b + 1
	if '--' in v:
		b = b - 1
print(b)


y = int(input())
x = 0
while y:
	y = y - 1
	st = input()
	if '+' in st:
		x = x + 1
	else:
		x = x - 1
print(x)


n = int(input())
x = 0
while n > 0:
	str1 = input()
	if str1[0] == '+' or str1[-1] == '+':
		x += 1
	else:
		x -= 1
	n -= 1
print(x)


x = 0
y = input()
y = int(y)
for i in range(0, y):
	k = input().lower()
	if k == '++x' or k == 'x++':
		x = x + 1
	if k == '--x' or k == 'x--':
		x = x - 1
print(x)


n = int(input())
x = 0
for _ in range(n):
	op = ''.join((c for c in input() if c != 'X'))
	x += 1 if op == '++' else -1
print(x)


otv = 0
for i in range(int(input())):
	otv += input()[1] == '+' or -1
print(otv)


import queue
__read_tokens = queue.Queue()

def next_string():
	while __read_tokens.empty():
		for i in input().split():
			__read_tokens.put(i)
	return __read_tokens.get()

def next_int():
	return int(next_string())

def next_float():
	return float(next_string())

def next_line():
	if not __read_tokens.empty():
		raise Exception('Unclean token cache')
	return input()
n = next_int()
x = 0
for i in range(n):
	s = next_string()
	if '++' in s:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
ret = 0
for i in range(n):
	s = input()
	if s == 'X':
		ret += 0
	elif s.count('-') == 2:
		ret -= 1
	else:
		ret += 1
else:
	print(ret)


n = int(input())
x = 0
if n >= 1 and n <= 150:
	i = 0
	while i < n:
		o = input()
		if '+' in o:
			x += 1
		else:
			x -= 1
		i += 1
	print(x)


T = int(input())
cases = []
for _ in range(T):
	cases.append(input())
result = 0
for case in cases:
	if case[0] == '+' or case[1] == '+':
		result += 1
	else:
		result -= 1
print(result)


import string
n = int(input())
x = 0
a = 'X++'
b = '++X'
for i in range(0, n):
	pieces = input()
	if pieces == a or pieces == b:
		x += 1
	else:
		x -= 1
print(x)


test_case = int(input())
x = 0
for cases in range(test_case):
	string = input()
	if string == '++X' or string == 'X++':
		x += 1
	else:
		x -= 1
print(x)


def main():
	x = 0
	ns = int(input())
	for i in range(ns):
		st = input()
		flag = 1
		for i in range(len(st)):
			if st[i] == '-':
				flag = 0
				break
		if flag:
			x += 1
		else:
			x -= 1
	print(x)
main()


num = int(input())
count = 0
for i in range(num):
	stat = input()
	if stat == 'X++' or stat == '++X':
		count = count + 1
	elif stat == 'X--' or stat == '--X':
		count = count - 1
print(count)


num_of_statements = int(input())
number = 0
for x in range(num_of_statements):
	statement = input()
	if '++' in statement:
		number += 1
	if '--' in statement:
		number -= 1
print(number)


n = int(input())
c = 0
while n > 0:
	line = str(input())
	if line[1] == '-':
		c -= 1
	else:
		c += 1
	n -= 1
print(c)


pos = ['x++', '++x', 'X++', '++X']
neg = ['x--', '--x', 'X--', '--X']
count = 0
for i in range(int(input())):
	n = input()
	if n in pos:
		count = count + 1
	elif n in neg:
		count = count - 1
print(count)


value = int(0)
list1 = []
x = int(input())
for i in range(x):
	inp = input()
	list1.append(inp)
length = len(list1)
for i in range(length):
	str = list1[i]
	if str == '\n':
		continue
	elif str == '++X' or str == 'X++':
		value = value + 1
	elif str == '--X' or str == 'X--':
		value = value - 1
	else:
		break
print(value)


n = int(input())
num = 0
for i in range(n):
	com = input()
	if '++' in com:
		num = num + 1
	if '--' in com:
		num = num - 1
print(num)


num = int(input())
total = 0
for i in range(num):
	word = input()
	if '++' in word:
		total += 1
	elif '-' in word:
		total -= 1
print(total)


y = int(input())
X = 0
for i in range(y):
	a = input()
	if a.find('X') != -1:
		if a.find('++') != -1:
			X += 1
		elif a.find('--') != -1:
			X -= 1
print(X)


line1 = input()
ctr = 0
for i in range(int(line1)):
	k = input()
	if k == '++X' or k == 'X++':
		ctr = ctr + 1
	else:
		ctr = ctr - 1
print(ctr)


n = int(input())
counter = 0
for x in range(0, n):
	string = input()
	if string == '++X' or string == 'X++':
		counter += 1
	else:
		counter -= 1
print(counter)


def solve():
	lines = int(input())
	(i, x) = (0, 0)
	while i != lines:
		state = str(input())
		if '++' in state:
			x += 1
		elif '--' in state:
			x -= 1
		else:
			print('Invalid syntax')
		i += 1
	print(x)
solve()


def bit_plus_plus():
	summe = 0
	for _ in range(int(input())):
		statement = input()
		if statement[0] == '+' or statement[1] == '+':
			summe += 1
		else:
			summe -= 1
	print(summe)
	return
bit_plus_plus()


n = int(input())
x = 0
for i in range(n):
	statement = input()
	op = statement.split('X')
	if '++' in op:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for _ in range(n):
	i = input()
	if i[0] == '+':
		x += 1
	elif i[0] == '-':
		x -= 1
	elif i[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
X = 0
if n >= 1 and n <= 150:
	for i in range(n):
		statement = str(input())
		if statement == '--X':
			X = X - 1
		elif statement == 'X++':
			X = X + 1
		elif statement == '++X':
			X = X + 1
		elif statement == 'X--':
			X = X - 1
		else:
			print('Nothing to Print')
print(X)


r = int(input())
q = 0
x = 0
while r != 0:
	a = str(input())
	if a == '++X':
		x = x + 1
	elif a == '--X':
		x = x - 1
	elif a == 'X++':
		x = x + 1
	elif a == 'X--':
		x = x - 1
	r = r - 1
print(x)


l = list((input() for i in range(int(input()))))
x = 0
for i in l:
	if i in ('X++', '++X'):
		x += 1
	if i in ('X--', '--X'):
		x -= 1
print(x)


import math

def Bit(a, n):
	x = 0
	for i in range(n):
		if a[i].count('++'):
			x = x + 1
		else:
			x = x - 1
	return x
pass
n = int(input())
a = []
for i in range(n):
	s = input()
	a.append(s)
print(Bit(a, n))


a = int(input())
res = 0
for i in range(0, a):
	b = str(input())
	new_b = list(b)
	if new_b[1] == '+':
		res += 1
	elif new_b[1] == '-':
		res -= 1
print(res)


n = int(input(''))
result = 0
while n > 0:
	n -= 1
	z = input()
	if z == '++X' or z == 'X++':
		result += 1
	else:
		result -= 1
print(result)


n = int(input())
m = 1
p = 0
while m <= n:
	a = str(input())
	if '++' in a:
		p = p + 1
	else:
		p = p - 1
	m = m + 1
print(p)


n = int(input())
x = 0
while n > 0:
	if input().count('+') > 0:
		x = x + 1
	else:
		x = x - 1
	n = n - 1
print(x)


num = int(input())
val = 0
for _ in range(num):
	operation = input()
	if operation == 'X++' or operation == '++X':
		val += 1
	if operation == 'X--' or operation == '--X':
		val -= 1
print(val)


def main():
	sum = 0
	n = int(input())
	for i in range(n):
		bit = input()
		if bit.count('+'):
			sum += 1
		if bit.count('-'):
			sum -= 1
	print(sum)
main()


cases = int(input())
x = 0
for y in range(cases):
	x -= 1
	x += 2 * ('+' in input())
print(x)


n = int(input())
o_l = []
for i in range(0, n):
	o_l.append(input())
x = 0
for j in o_l:
	if j == '++X':
		x = x + 1
	if j == 'X++':
		x = x + 1
	if j == '--X':
		x = x - 1
	if j == 'X--':
		x = x - 1
print(x)


a = int(input())
e = 0
for i in range(a):
	x = 0
	b = input()
	if b[2] == '+' and b[1] == '+' or (b[0] == '+' and b[1] == '+'):
		x = x + 1
	elif b[2] == '-' and b[1] == '-' or (b[0] == '-' and b[1] == '-'):
		x = x - 1
	e = e + x
print(e)


n = int(input())
if 1 <= n <= 150:
	res = 0
	for i in range(n):
		st = input()
		if '++' in st:
			res += 1
		if '--' in st:
			res -= 1
	print(res)


x = 0
y = int(input())
for i in range(y):
	p = str(input(''))
	if '++' in p:
		x += 1
	if '--' in p:
		x -= 1
print(x)


n = int(input())
v = 0
for i in range(0, n):
	s = input()
	if '+' in s:
		v += 1
		continue
	elif '-' in s:
		v -= 1
print(v)


n = int(input())
ans = 0
for i in range(0, n):
	arr = list(map(str, input()))
	if arr.count('+'):
		ans = ans + 1
	else:
		ans = ans - 1
print(ans)


sum = 0
for t in range(int(input())):
	a = str(input())
	if a == '++X':
		sum += 1
	elif a == '--X':
		sum -= 1
	elif a == 'X++':
		sum += 1
	elif a == 'X--':
		sum -= 1
print(sum)


n = int(input())
listS = [input() for x in range(n)]
x = 0
for f in listS:
	if f.upper() == '++X' or f.upper() == 'X++':
		x = x + 1
	elif f.upper() == '--X' or f.upper() == 'X--':
		x = x - 1
print(x)


n = int(input())
x = 0

def operacion(s):
	if s[1] == '+':
		return 1
	else:
		return -1
while n > 0:
	linea = input()
	x = operacion(linea) + x
	n = n - 1
print(x)


def main():
	num_statements = int(input())
	x = 0
	for i in range(num_statements):
		command = input()
		if command.find('+') >= 0:
			x += 1
		else:
			x -= 1
	print(x)
main()


def main():
	x = 0
	for _ in range(int(input().strip())):
		instruction = input().strip()
		if instruction[0] == 'X':
			if instruction[1:] == '++':
				x += 1
			else:
				x -= 1
		elif instruction[:len(instruction) - 1] == '++':
			x += 1
		else:
			x -= 1
	print(x)
main()


a = int(input())
cnt = 0
for i in range(a):
	p = input()
	if '+' in p:
		cnt += 1
	else:
		cnt -= 1
print(cnt)


x = 0
inp = range(int(input()))
for i in inp:
	y = input().lower()
	if y == '++x' or y == 'x++':
		x += 1
	elif y == '--x' or y == 'x--':
		x -= 1
print(x)


n = int(input())
c = 0
while n:
	s = input()
	if '++' in s:
		c += 1
	else:
		c -= 1
	n -= 1
print(c)


count = int(input())
x = 0
for i in range(0, count):
	text = input().lower()
	if text == '++x':
		x += 1
	elif text == 'x++':
		x += 1
	elif text == '--x':
		x -= 1
	elif text == 'x--':
		x -= 1
print(x)


Valor = 0
for i in range(int(input())):
	palabra = str(input())
	if palabra.count('+') > 1:
		Valor += 1
	else:
		Valor -= 1
print(Valor)


x = 0
k = int(input())
while k > 0:
	l = input()
	k -= 1
	if l == 'X++' or l == '++X':
		x += 1
	elif l == 'X--' or l == '--X':
		x -= 1
print(x)


n = int(input())
inputs = []
for x in range(n):
	inputs.append(input())
X = 0
for k in inputs:
	op = k[0] if k[0] != 'X' else k[-1]
	if op == '+':
		X += 1
	else:
		X -= 1
print(X)


num = int(input())
plus = ['++X', 'X++']
minus = ['--X', 'X--']
res = 0
for var in list(range(num)):
	state = input()
	if state in plus:
		res = res + 1
	else:
		res = res - 1
print(res)


n = int(input())
output = 0
while n > 0:
	line = input()
	if '++' in line:
		output += 1
	if '--' in line:
		output -= 1
	n -= 1
print(output)


n = int(input())
x = 0
X = 0
list1 = []
while x != n:
	value = input()
	list1.append(value)
	x += 1
count = 0
while count != len(list1):
	if '+' in list1[count]:
		X += 1
	else:
		X += -1
	count += 1
print(X)


x = 0
for _ in range(int(input())):
	st = input()
	if st.startswith('+') or '+' in st:
		x += 1
	elif st.startswith('-') or '-' in st:
		x -= 1
print(x)


n = int(input())
v = 0
for i in range(n):
	b = input()
	if b[1] == '+':
		v += 1
	else:
		v -= 1
print(v)


N = int(input())
Res = 0
for i in range(N):
	x = input()
	if x[1] == '+':
		Res += 1
	else:
		Res -= 1
print(Res)


w = int(input())
r = 0
for i in range(w):
	h = input()
	if '++' in h:
		r = r + 1
	if '--' in h:
		r = r - 1
print(r)


m = int(input())
X = 0
input_lists = []
summ = 0
for times in range(1, m + 1):
	input_lists.append(input())
dict1 = {'X++': 1, '++X': 1, 'X--': -1, '--X': -1}
summ = list(map(lambda X: dict1[X], input_lists))
print(sum(summ))


num = int(input())
ans = 0
for i in range(0, num):
	value_new = input()
	if '++' in value_new:
		ans += 1
	if '--' in value_new:
		ans = ans - 1
print(ans)


t = int(input())
cnt = 0
for _ in range(t):
	s = input()
	for c in s:
		if c == '+':
			cnt += 1
			break
		elif c == '-':
			cnt -= 1
			break
print(cnt)


N = int(input())
X = 0
for i in range(N):
	word = input()
	if word.find('--') != -1 and word.find('X') != -1:
		X = X - 1
	elif word.find('++') != -1 and word.find('X') != -1:
		X = X + 1
print(X)


n = int(input())
x = 0
i = 0
accum = 0
while i < n:
	bit = input()
	if bit == 'X++' or bit == '++X':
		accum = accum + 1
	if bit == '--X' or bit == 'X--':
		accum = accum - 1
	i += 1
print(accum)


N = int(input())
X = 0
A = []
for i in range(N):
	bitland = input()
	A.append(bitland)
for j in range(N):
	if A[j] == '++X' or A[j] == 'X++':
		X += 1
	elif A[j] == '--X' or A[j] == 'X--':
		X -= 1
print(X)


number = int(input())
x = 0
if number >= 1 and number <= 150:
	for i in range(number):
		userInput = input()
		if userInput == '++X':
			x += 1
		if userInput == 'X++':
			x += 1
		if userInput == '--X':
			x -= 1
		if userInput == 'X--':
			x -= 1
	print(x)


N = int(input())
x = 0
for i in range(0, N):
	s = input().lower()
	if s == 'x++' or s == '++x':
		x += 1
	elif s == 'x--' or s == '--x':
		x -= 1
print(x)


value = 0
for i in range(int(input())):
	str1 = input()
	if str1[0] == '+' or str1[1] == '+':
		value += 1
	else:
		value -= 1
print(value)


t = int(input())
result = 0
for i in range(t):
	st = input()
	if st.find('+') != -1:
		result += 1
	else:
		result -= 1
print(result)


n = int(input())
x = 0
while n > 0:
	L = list(input())
	if '+' in L:
		x = x + 1
	else:
		x = x - 1
	n = n - 1
print(x)


user_input = int(input())
X = 0
for x in range(user_input):
	op = input()
	if op == 'X++' or op == '++X':
		X += 1
	else:
		X -= 1
print(X)


def solve():
	x = 0
	for r in range(int(input())):
		s = input()
		if s == '++X' or s == 'X++':
			x += 1
		else:
			x -= 1
	return x
print(solve())


from itertools import groupby
import sys
n_statements = int(input())
x = 0
statements = []
for i in range(n_statements):
	statements.append(input())
for i in statements:
	if '+' in i:
		x += 1
	else:
		x -= 1
print(x)


def parse(string):
	toReturn = None
	for char in string:
		if char == '+':
			toReturn = True
		elif char == '-':
			toReturn = False
		if toReturn == True or toReturn == False:
			break
	return toReturn

def main():
	output = 0
	for i in range(0, int(input())):
		temp = input()
		if parse(temp):
			output += 1
		else:
			output -= 1
	print(output)
main()


t = int(input())
p = 0
n = 0
for _ in range(t):
	s = input()
	if s.count('+') == 2:
		p += 1
	else:
		n += 1
print(p - n)


t = int(input())
count = 0
for _ in range(t):
	l = input()
	if '+' in l:
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
plus = 0
minus = 0
for i in range(n):
	a = str(input())
	if a[1] == '+':
		plus += 1
	else:
		minus += 1
print(plus - minus)


count = 0
for _ in range(int(input())):
	inp = input()
	if inp[0] == '+' or inp[-1] == '+':
		count = count + 1
	else:
		count = count - 1
print(count)


i = 0
x = 0
n = int(input(''))
while i < n:
	s = input('')
	if s[1] == '+':
		x = x + 1
	else:
		x = x - 1
	i = i + 1
print(x)


no_operations = int(input())
operations = []
total = 0
for i in range(no_operations):
	operations.append(input())
for j in range(len(operations)):
	if operations[j] == '++X' or operations[j] == 'X++':
		total += 1
	else:
		total -= 1
print(total)


n = int(input())
a = []
count = 0
masuk = ['++X', 'X++', '--X', 'X--']
for i in range(n):
	a.append(input())
for ii in a:
	if ii == masuk[0] or ii == masuk[1]:
		count = count + 1
	elif ii == masuk[2] or ii == masuk[3]:
		count = count - 1
print(count)


def main():
	n = int(input())
	op = ''
	d = 0
	for i in range(n):
		op = input()
		if op[0] == '+' or op[2] == '+':
			d += 1
		else:
			d -= 1
	print(d)
main()


def bit(x=0):
	i = 0
	n = input()
	while i < int(n):
		s = input()
		if s.find('++') >= 0:
			x += 1
		elif s.find('--') >= 0:
			x -= 1
		i += 1
	print(x)
bit()


n = int(input())
tot = 0
for _ in range(n):
	a = input()
	for i in range(len(a)):
		if a[i] == '+':
			tot += 1
			break
		elif a[i] == '-':
			tot -= 1
			break
print(tot)


x = 0
for _ in range(int(input())):
	s = input()
	if s.count('+') == 2:
		x += 1
	elif s.count('-') == 2:
		x -= 1
print(x)


statements = int(input())
x = 0
for i in range(statements):
	line = input()
	if line[0] == '+':
		x += 1
	elif line[0] == '-':
		x -= 1
	elif line[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


def watermelon():
	w = int(input())
	if w % 2 == 0:
		print('YES')
	else:
		print('NO')

def way_too_long_words():
	n = int(input())
	words = [input() for x in range(n)]
	for word in words:
		if len(word) > 10:
			print(f'{word[0]}{len(word) - 2}{word[-1]}')
		else:
			print(word)

def team():
	n = int(input())
	v = [[int(x) for x in input().split()] for i in range(n)]
	o = 0
	for l in v:
		if l.count(1) >= 2:
			o += 1
	print(o)

def next_round():
	(n, k) = map(int, input().split())
	s = [int(x) for x in input().split()]
	o = 0
	i = s[k - 1]
	for j in s:
		if j >= i and j != 0:
			o += 1
	print(o)

def domino_piling():
	import math
	(m, n) = map(int, input().split())
	o = 0
	if m * n < 2:
		print(0)
		exit()
	if m % 2 == 0:
		o = m * n / 2
	elif n % 2 == 0:
		o = m * n / 2
	else:
		o = math.floor(m * n / 2)
	print(int(o))

def bitplusplus():
	n = int(input())
	s = [input() for i in range(n)]
	o = 0
	for j in s:
		if '++' in j:
			o += 1
		if '--' in j:
			o -= 1
	print(o)
bitplusplus()


plus = '++'

def main():
	out = 0
	n = int(input())
	for i in range(n):
		command = input()
		if plus in command:
			out += 1
		else:
			out -= 1
	return out
print(main())


n = int(input(''))
x = 0
for i in range(n):
	y = input('')
	if y == '++X' or y == 'X++':
		x += 1
	elif y == '--X' or y == 'X--':
		x -= 1
	else:
		x = 0
print(x)


totalInput = int(input())
count = 0
while totalInput > 0:
	totalInput -= 1
	statement = input()
	if '+' in statement:
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
ops = [input() for i in range(n)]
x = 0
for op in ops:
	if op[0] == '+' or op[-1] == '+':
		x += 1
	elif op[0] == '-' or op[-1] == '-':
		x -= 1
print(x)


n = int(input())
X = 0
while n:
	s = input()
	if s[1] == '+':
		X += 1
	else:
		X -= 1
	n -= 1
print(X)


n = int(input())
x = 0
for num in range(n):
	a = input()
	if '--' in a:
		x -= 1
	elif '++' in a:
		x += 1
print(x)


test = int(input())
z = 0
for x in range(test):
	t = str(input())
	if '+' in t:
		z += 1
	else:
		z -= 1
print(z)


myinput = int(input())
number = 0
for x in range(myinput):
	operator = input()
	if operator == '++X':
		number = number + 1
	elif operator == 'X++':
		number = number + 1
	elif operator == '--X':
		number = number - 1
	elif operator == 'X--':
		number = number - 1
print(number)


n = int(input())
x = 0
a = [None] * n
for i in range(0, n):
	a[i] = input()
	var = a[i]
	if len(var) > 0 and len(var) <= 3:
		for j in range(1, len(var)):
			if var[j] == '+' and var[j - 1] == '+':
				x += 1
			elif var[j] == '-' and var[j - 1] == '-':
				x -= 1
print(x)


n = int(input())
cnt = 0
for _ in range(n):
	cnt += '+' in input()
print(2 * cnt - n)


n = int(input())
x = 0
while n > 0:
	s = list(input())
	if s[1] == '+':
		x += 1
	elif s[1] == '-':
		x -= 1
	n -= 1
print(x)


n = int(input())
x = 0
while n != 0:
	proposal = str(input())
	if proposal[1] == '+':
		x += 1
	else:
		x -= 1
	n -= 1
print(x)


n = int(input())
d = {'X++': 1, '++X': 1, 'X--': -1, '--X': -1}
x = 0
for _ in range(n):
	x += d[input()]
print(x)


x = 0
for i in range(int(input())):
	vriable = input()
	oprtn = {'X++': x + 1, '++X': x + 1, '--X': x - 1, 'X--': x - 1}
	x = oprtn[vriable]
print(x)


total = 0
n = int(input())
a = []

def check(st):
	for i in range(len(st)):
		if st[i] == '+':
			return True
	return False
for i in range(n):
	temp = input()
	if check(temp):
		total += 1
	else:
		total -= 1
print(total)


ini = 0
n = int(input())
input_list = []
for i in range(n):
	input_list.append(input())
for statement in input_list:
	if statement == '++X' or statement == 'X++':
		ini += 1
	elif statement == '--X' or statement == 'X--':
		ini -= 1
	else:
		pass
print(ini)


n = int(input())
(x, temp) = (0, 0)
for i in range(n):
	comm = input()
	if comm == '++X':
		x += 1
	elif comm == 'X++':
		x += 1
	elif comm == '--X':
		x -= 1
	elif comm == 'X--':
		x -= 1
print(x)


n = int(input())
x = 0

def bit(a):
	if '+' in a:
		return 1
	else:
		return -1
while n > 0:
	x = x + bit(input())
	n = n - 1
print(x)


amount = 0
for i in range(int(input())):
	ss = input()
	if '+' in ss:
		amount += 1
	else:
		amount -= 1
print(str(amount))


test_cases = int(input())
data = []
while test_cases > 0:
	data.append(input())
	test_cases -= 1
x = 0
for i in range(0, len(data)):
	if data[i] == 'X++' or data[i] == '++X':
		x += 1
	elif data[i] == 'X--' or data[i] == '--X':
		x -= 1
print(x)


bit = 0
for i in range(int(input())):
	statement = input()
	if '++' in statement:
		bit += 1
	if '--' in statement:
		bit -= 1
print(bit)


o = int(input())
x = 0
for i in range(o):
	stat = input()
	if '++' in stat:
		x += 1
	elif '--' in stat:
		x -= 1
print(x)


x = int(input())
l = []
c = 0
for i in range(x):
	y = input()
	l.append(y)
for i in l:
	if i == '++X' or i == 'X++':
		c += 1
	else:
		c -= 1
print(c)


n = int(input())
st = '++X'
st1 = 'X++'
st2 = '--X'
st3 = 'X--'
result = 0
for i in range(n):
	str = input()
	if str == st:
		result = result + 1
	elif str == st1 and i < n:
		result = result + 1
	elif str == st2:
		result = result - 1
	elif str == st3 and i < n:
		result = result - 1
print(result)


n = int(input())
l = []
i = 0
for _ in range(n):
	op = str(input())
	if '++' in op:
		i += 1
	elif '--' in op:
		i -= 1
print(i)


def bit(s):
	if '+' in s:
		return 1
	return -1
n = int(input())
val = 0
for i in range(n):
	s = input()
	val += bit(s)
print(val)


x = 0
n = int(input())
newOp = list()
for i in range(n):
	operator = input()
	newOp.append(operator)
for i in newOp:
	if i == '--X' or i == 'X--':
		x -= 1
	elif i == '++X' or i == 'X++':
		x += 1
print(x)


cases = int(input())
value = 0
for x in range(0, cases):
	if '++' in input():
		value += 1
	else:
		value -= 1
print(value)


import sys
s = sys.stdin.read()
print(s.count('++') - s.count('--'))


k = 0
for _ in range(int(input())):
	if input().count('+') >= 1:
		k += 1
	else:
		k -= 1
print(k)


import math
vowel_list = ['a', 'e', 'i', 'o', 'u', 'y']

def watermelon_4a():
	num = int(input())
	if num % 2 == 0:
		if num == 2:
			print('NO')
		else:
			print('YES')
	else:
		print('NO')
	return

def theatre_square_1a():
	input_list = read_list(int, input())
	length = input_list[0]
	width = input_list[1]
	flagstone = input_list[2]
	ans_0 = int(math.ceil(length / flagstone))
	ans_1 = int(math.ceil(width / flagstone))
	print(ans_0 * ans_1)
	return

def way_to_long_words_71a():
	cases = read_int()
	for counter in range(cases):
		word = input()
		word_len = len(word)
		if word_len <= 10:
			print(word)
		else:
			print(word[0] + str(word_len - 2) + word[word_len - 1])
	return

def next_round_158a():
	read_in = read_list(int, input())
	participant_scores = read_list(int, input())
	total_participants = read_in[0]
	finish_place = read_in[1]
	counter = 0
	if total_participants == 1:
		if participant_scores[0] == 0:
			print(0)
		else:
			print(1)
		return
	elif participant_scores[finish_place - 1] == 0:
		for participant in participant_scores:
			if participant != 0:
				counter += 1
	else:
		for participant in participant_scores:
			if participant >= participant_scores[finish_place - 1]:
				counter += 1
	print(counter)
	return

def string_task_118a():
	string = input()
	string = string.lower().replace('a', '').replace('e', '').replace('i', '').replace('o', '').replace('u', '').replace('y', '')
	final_str = ''
	for letter in string:
		final_str += '.'
		final_str += letter
	print(final_str)
	return

def domino_piling_50a():
	dimensions = read_list(int, input())
	length = dimensions[0]
	width = dimensions[1]
	print(int(math.floor(length * width / 2)))
	return

def team_282a():
	problems_implemented = 0
	total_problems = read_int()
	for problem in range(total_problems):
		decisions = read_list(int)
		if sum(decisions) >= 2:
			problems_implemented += 1
	print(problems_implemented)
	return

def bitplusplus_282a():
	statements = read_int()
	counter = 0
	for statement in range(statements):
		statement = input()
		if '++' in statement:
			counter += 1
		else:
			counter -= 1
	print(counter)
	return

def read_list(type_in):
	return list(map(type_in, input().split()))

def read_int():
	return int(input())

def main():
	bitplusplus_282a()
	return
main()


n = int(input())
x = 0
for i in range(n):
	st = input()
	if st[0] == '+':
		x += 1
	if st[0] == '-':
		x -= 1
	if st[0] == 'X' and st[1] == '+':
		x += 1
	if st[0] == 'X' and st[1] == '-':
		x -= 1
print(x)


import sys
gold = 0
n = int(sys.stdin.readline().rstrip())
for _ in range(n):
	line = sys.stdin.readline().strip()
	if line[1] == '+':
		gold += 1
	else:
		gold -= 1
print(gold)


def Bit():
	n = int(input())
	exps = []
	x = 0
	for i in range(n):
		exp = input()
		exps.append(exp)
	for i in exps:
		if '+' in i:
			x += 1
		else:
			x -= 1
	print(x)
Bit()


x = 0
for _ in range(int(input())):
	command = input()
	if command == 'X++' or command == '++X':
		x += 1
	if command == 'X--' or command == '--X':
		x -= 1
print(x)


tn = int(input())
a = 0
for i in range(tn):
	str1 = input()
	if '++' in str1:
		a += 1
	elif '--' in str1:
		a -= 1
print(a)


n = int(input())
l = []
for i in range(n):
	l.append([j for j in input()])
c = 0
for i in l:
	if '+' in i:
		c = c + 1
	else:
		c = c - 1
print(c)


x = 0
(plus, minus) = (0, 0)
n = int(input())
for i in range(n):
	s = input()
	j = 0
	for j in s:
		if j == '+':
			plus += 1
		elif j == '-':
			minus += 1
print(x + plus // 2 - minus // 2)


x = 0
for _ in range(int(input())):
	s = input()
	if ord(s[0]) + ord(s[1]) + ord(s[2]) == 174:
		x += 1
	else:
		x = x - 1
print(x)


a = int(input())
x = 0
for i in range(a):
	k = input()
	plus = k.find('++')
	if plus == -1:
		plus = 0
		x = x - 1
	minus = k.find('--')
	if minus == -1:
		minus = 0
		x = x + 1
print(x)


n = int(input())
m = []
l = 0
for i in range(n):
	k = str(input())
	m.append(k)
for j in range(0, len(m)):
	if m[j] == 'X++' or m[j] == '++X':
		l += 1
	if m[j] == 'X--' or m[j] == '--X':
		l -= 1
print(l)


from collections import deque
from math import ceil

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
n = ii()
c = 0
for i in range(n):
	s = si()
	if s[0] == 'X':
		if s[1] == '+':
			c += 1
		else:
			c -= 1
	if s[0] == '+':
		c += 1
	if s[0] == '-':
		c -= 1
print(c)


n = int(input())
L = []
for _ in range(n):
	inp = input()
	L.append(inp)
X = 0
for element in L:
	if element == 'X++' or element == '++X':
		X += 1
	elif element == '--X' or element == 'X--':
		X -= 1
	else:
		X = 0
print(X)


n = int(input())
total = 0
for i in range(n):
	xulie = list(input())
	for zimu in xulie:
		if zimu == '+':
			total = total + 1
		elif zimu == '-':
			total = total - 1
print(int(total / 2))


nline = int(input())
x = 0
for i in range(nline):
	opr = input()
	if '+' in opr:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
l = []
(c1, c2) = (0, 0)
for i in range(n):
	k = input()
	if k == 'X++' or k == '++X':
		c1 += 1
	else:
		c2 += 1
print(c1 - c2)


s = int(input())
count = 0
for _ in range(s):
	l = input()
	if l == 'X++' or l == '++X':
		count += 1
	elif l == '--X' or l == 'X--':
		count -= 1
print(count)


n = int(input())
count = 0
for i in range(n):
	a = input()
	if a[0] == '+' and a[1] == '+' and (a[2] == 'X'):
		count += 1
	elif a[0] == 'X' and a[1] == '+' and (a[2] == '+'):
		count += 1
	elif a[0] == 'X' and a[1] == '-' and (a[2] == '-'):
		count -= 1
	elif a[0] == '-' and a[1] == '-' and (a[2] == 'X'):
		count -= 1
print(count)


operation = []
for i in range(int(input())):
	op = input()
	if op.count('++') > 0:
		operation.append(1)
	else:
		operation.append(-1)
print(sum(operation))


list = []
x = 0
n = int(input())
for test_case in range(n):
	list.append(input().split())
for items in list:
	for char in items:
		if char[1] == '+':
			x += 1
		else:
			x -= 1
print(x)


from sys import stdin

def plus_or_minus(op):
	if op == '+':
		return 1
	else:
		return -1
stdin.readline()
value = 0
for line in stdin.readlines():
	if line[0].lower() == 'x':
		value += plus_or_minus(line[1])
	else:
		value += plus_or_minus(line[0])
print(value)


import sys
import math
import re
import io

def main():
	n = int(input())
	val = 0
	for i in range(n):
		s = input()
		if s == '++X':
			val = val + 1
		elif s == 'X++':
			val = val + 1
		elif s == 'X--':
			val = val - 1
		elif s == '--X':
			val = val - 1
	print(val)
main()


test_case = int(input())
if test_case >= 1 and test_case <= 150:
	X = 0
	for i in range(test_case):
		value = input()
		if '+' in value:
			X += 1
		elif '-' in value:
			X -= 1
	print(X)


total = 0
for i in range(int(input())):
	if '++' in input():
		total += 1
	else:
		total -= 1
print(total)


n = int(input())
i = 0
X = 0
while i < n:
	order = input()
	o = order.replace('X', '')
	if o == '++':
		X = X + 1
	else:
		X = X - 1
	i = i + 1
print(str(X))


import re
n = int(input())
s = []
for i in range(n):
	s.append(input())
pl = re.compile('\\+')
mn = re.compile('\\-')
x = 0
for l in s:
	if pl.findall(l):
		x += 1
	elif mn.findall(l):
		x -= 1
print(x)


N = int(input())
ans = 0
for n in range(N):
	if '+' in input():
		ans += 1
	else:
		ans -= 1
print(ans)


x = 1
total = 0
n = int(input())
for i in range(n):
	user = input()
	if user == '++X' or user == 'X++':
		total += 1
	else:
		total -= 1
	total = total
print(total)


num = int(input())
sum = 0
for x in range(num):
	operation = input()
	if '+' in operation:
		sum += 1
	else:
		sum -= 1
print(sum)


while True:
	try:
		x = 0
		n = int(input())
		for i in range(n):
			cmd = input()
			x = x + 1 if cmd[1] == '+' and (cmd[0] == '+' or cmd[2] == '+') else x
			x = x - 1 if cmd[1] == '-' and (cmd[0] == '-' or cmd[2] == '-') else x
		print(x)
	except EOFError:
		break


nb_actions = int(input())
x = 0
for action in range(nb_actions):
	a = input()
	if a[1] == '-':
		x -= 1
	else:
		x += 1
print(x)


Nmbr_of_oprtn = int(input())
x = 0
for i in range(0, Nmbr_of_oprtn):
	inpt = input()
	if inpt == '++X' or inpt == 'X++':
		x += 1
	elif inpt == '--X' or inpt == 'X--':
		x -= 1
print(x)


N = int(input())
A = []
for i in range(N):
	A.append(input())
x = 0
for i in A:
	if i == '++X' or i == 'X++':
		x = x + 1
	else:
		x = x - 1
print(x)


t = int(input())
x = 0
while t:
	z = input()
	if z == '++X' or z == 'X++':
		x += 1
	elif z == '--X' or z == 'X--':
		x -= 1
	t -= 1
print(x)


N = int(input())
ans = 0
for i in range(N):
	a = input()
	if a == '++X' or a == 'X++':
		b = 1
	elif a == '--X' or a == 'X--':
		b = -1
	ans = ans + b
print(ans)


def sgn(a):
	if a >= 0:
		return 1
	else:
		return 0

def stat(a):
	return sgn(a.find('++')) - sgn(a.find('--'))
n = int(input())
x = 0
for i in range(n):
	x += stat(input())
print(x)


n = int(input())
m = 0
for i in range(n):
	a = input()
	if '++' in a:
		m += 1
	else:
		m -= 1
print(str(m))


t = int(input())
x = 0
while t > 0:
	exp = input()
	if '+' in exp:
		x = x + 1
	if '-' in exp:
		x = x - 1
	t = t - 1
print(x)


withFile = 0
if withFile == 1:
	fin = open('input.txt', 'r')
	fout = open('output.txt', 'w')

def getl():
	if withFile == 0:
		return input()
	else:
		return fin.readline()

def printl(s):
	if withFile == 0:
		print(s)
	else:
		fout.write(str(s))

def get_arr():
	x = getl().split(' ')
	if x[-1] == '':
		x = x[:-1]
	return list(map(int, x))
k = get_arr()[0]
cur = 0
while k != 0:
	k -= 1
	s = getl()
	if s.find('++') != -1:
		cur += 1
	else:
		cur -= 1
printl(cur)
if withFile == 1:
	fin.close()
	fout.close()


n = int(input())
list = []
for i in range(0, n):
	list.append(input())
result = 0
for i in range(0, len(list)):
	statement = list[i]
	if statement[1] == '+':
		result = result + 1
	elif statement[1] == '-':
		result = result - 1
print(result)


n = int(input())
s = 0
for i in range(n):
	if '--' in input().split('X'):
		s -= 1
	else:
		s += 1
print(s)


t = int(input())
c = 0
while t > 0:
	s = input()
	if s == 'X++' or s == '++X':
		c += 1
	else:
		c -= 1
	t -= 1
print(c)


n = int(input())
x = 0
for i in range(n):
	p = input()
	if '+' in p:
		c = int(p.count('+') / 2)
		x = x + c
	else:
		c = p.count('-')
		x = x - 1
print(x)


n = input()
n = int(n)
schetchik = 0
x = 0
while schetchik < n:
	stroka = input()
	if stroka == '++X' or stroka == 'X++':
		x = x + 1
	else:
		x = x - 1
	schetchik = schetchik + 1
print(x)


def s(a, x):
	if '+' in a:
		x = x + 1
	if '-' in a:
		x = x - 1
	return x
y = int(input())
x = 0
l = []
for i in range(y):
	a = str(input())
	c = s(a, x)
	l.append(c)
print(sum(l))


n = int(input())
result = 0
for i in range(n):
	if input().replace('X', '') == '++':
		result += 1
	else:
		result -= 1
print(result)


n = int(input())
l = []
if 1 <= n <= 150:
	for i in range(0, n):
		x = input()
		if x == '--X' or x == 'X--':
			num = -1
			l.append(num)
		elif x == '++X' or x == 'X++':
			num = 1
			l.append(num)
	add = sum(l)
	print(add)


from sys import stdin, stdout, exit as sys_ret
(f_input, f_print, f_flush) = (stdin.readline, stdout.write, stdout.flush)
value = 0
for _ in range(int(f_input())):
	string = f_input()
	value = value + 1 if string[1] == '+' else value - 1
f_print(str(value))


totalInp = int(input())
iniVal = 0
for i in range(totalInp):
	inp = input()
	if inp.count('-') != 0:
		iniVal -= 1
		continue
	if inp.count('+') != 0:
		iniVal += 1
		continue
print(iniVal)


n = int(input())
x = 0
for i in range(n):
	m = input()
	if m[0] == '+' or m[-1] == '+':
		x = x + 1
	elif m[0] == '-' or m[-1] == '-':
		x = x - 1
	else:
		pass
print(x)


n = int(input())
cnt = 0
for i in range(0, n):
	s = list(input())
	if s.count('+') == 2:
		cnt += 1
	elif s.count('-') == 2:
		cnt -= 1
print(cnt)


n1 = input()
n = int(n1)
x = 0
for i in range(n):
	m = input()
	for j in m:
		if j == '+':
			x = x + 0.5
		elif j == '-':
			x = x - 0.5
x = int(x)
print(x)


operations_count = int(input())
x_value = 0
for i in range(0, operations_count):
	operation = input()
	if '+' in operation:
		x_value += 1
	else:
		x_value -= 1
print(x_value)


def inp():
	cases = input()
	cases = int(cases)
	a = []
	for i in range(0, cases):
		s = input()
		a.append(s)
	return a

def bits(ss):
	x = 0
	for sr in ss:
		if '+' in sr:
			x += 1
		elif '-' in sr:
			x -= 1
	print(x)
bits(inp())


n = int(input())
x = 0
for i in range(n):
	a = input()
	b = list(a)
	c = b.count('-') / 2
	d = b.count('+') / 2
	x = x - c + d
print(int(x))


n = int(input())
res = 0
for _ in range(n):
	word = input()
	if word == '++X' or word == 'X++':
		res += 1
	else:
		res -= 1
print(res)


inc = ['++X', 'X++']
dec = ['--X', 'X--']
x = 0
n = int(input())
for _ in range(n):
	s = input()
	if s in inc:
		x += 1
	elif s in dec:
		x -= 1
print(x)


a = int(input())
k = 0
l = 0
for x in range(0, a):
	t = input()
	for x in t:
		if x == '+':
			l = l + 0.5
		if x == '-':
			k = k - 0.5
print(int(k + l))


n = int(input())
k = 0
for i in range(0, n):
	l = input()
	k += 1 if l.startswith('++') or l.endswith('++') else -1
print(k)


num1 = int(input())
x = 0
for i in range(0, num1):
	stat1 = input()
	stat1 = stat1.replace('X', '')
	if stat1 == '++':
		x = x + 1
	elif stat1 == '--':
		x = x - 1
print(x)


x = int(input(''))
value = 0
for k in range(x):
	y = str(input(''))
	if y[0] == '+':
		value += 1
	elif y[1] == '+':
		value += 1
	elif y[2] == '+':
		value += 1
	else:
		value -= 1
print(value)


print(sum((44 - ord(input()[1]) for i in range(int(input())))))


def checker(x):
	liss = str(x[0])
	for j in range(0, 3):
		if liss[j] == '+':
			return 1
		elif liss[j] == '-':
			return 0
m = int(input())
count = 0
ips = []
for i in range(0, m):
	w = input()
	ips.append(w.split())
for i in range(0, m):
	if checker(ips[i]):
		count += 1
	else:
		count -= 1
print(count)


import sys
s = sys.stdin.read()
s = s.split('\n')
x = 0
for st in s[1:]:
	if st == '++X' or st == 'X++':
		x += 1
	if st == '--X' or st == 'X--':
		x -= 1
print(x)


v = int(input())
r = 0
for i in range(v):
	o = input()
	if '++' in o:
		r += 1
	elif '--' in o:
		r -= 1
print(r)


n = int(input())
s = 0
for i in range(n):
	exp = input()
	if exp == '++X':
		s = s + 1
	elif exp == '--X':
		s = s - 1
	elif exp == 'X--':
		s = s - 1
	elif exp == 'X++':
		s = s + 1
	else:
		pass
print(s)
i += 1


def bit():
	result = 0
	n = input()
	for i in range(int(n)):
		operation = input().lower()
		if operation == 'x++' or operation == '++x':
			result += 1
		elif operation == 'x--' or operation == '--x':
			result -= 1
	print(result)
bit()


n = int(input())
b = list()
d = 0
for i in range(n):
	a = input()
	b.append(a)
for i in range(n):
	if b[i] == '++X' or b[i] == 'X++':
		d += 1
	elif b[i] == '--X' or b[i] == 'X--':
		d -= 1
print(d)


count = int(input())
number = 0
for i in range(count):
	line = input()
	if line[0] == '+' or line[2] == '+':
		number += 1
	else:
		number -= 1
(print(number),)


import math
n = input()
count = 0
for i in range(int(n)):
	opp = input()
	if opp.find('++') >= 0:
		count += 1
	else:
		count -= 1
print(count)


n = input()
n = int(n)
sub1 = '+'
sub2 = '-'
c = 1
b = 0
while c <= n:
	str = input()
	c = c + 1
	z = str.count(sub1)
	y = str.count(sub2)
	if z == 2:
		b = b + 1
	if y == 2:
		b = b - 1
print(b)


s = int(input())
x = 0
for i in range(0, s):
	t = input()
	m = t[0]
	n = t[1]
	if m == '+' or n == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


nr = int(input())
n = 0
for i in range(nr):
	op = input()
	if op[0] == '+' or op[2] == '+':
		n = n + 1
	elif op[0] == '-' or op[2] == '-':
		n = n - 1
print(n)


t = int(input())
count = 0
for i in range(t):
	s = input()
	y = s.count('+')
	z = s.count('-')
	if y == 2:
		count += 1
	elif z == 2:
		count -= 1
print(count)


n = int(input())
number = 0
for i in range(n):
	string = input()
	inc = '++'
	dec = '--'
	if inc in string:
		number += 1
	else:
		number -= 1
print(number)


n = int(input())
ctr = 0
while n:
	a = input()
	if a[1] == '-':
		ctr -= 1
	else:
		ctr += 1
	n -= 1
print(ctr)


n = int(input())
x = 0
for i in range(n):
	order = ''
	o = input()
	for j in range(3):
		if o[j] == '+' or o[j] == '-':
			order = order + o[j]
	if order == '++':
		x += 1
	if order == '--':
		x -= 1
print(x)


inp = input()
total = 0
for i in range(int(inp)):
	inp1 = input()
	if inp1 == '++X' or inp1 == 'X++':
		total += 1
	elif inp1 == '--X' or inp1 == 'X--':
		total -= 1
print(total)


c = int(input())
x = 0
while c:
	i = input()
	if i[0] == '-' or i[1] == '-':
		x = x - 1
	else:
		x = x + 1
	c = c - 1
print(x)


t = int(input())
v = 0
while t > 0:
	t -= 1
	s = input()
	if '++' in s:
		v += 1
	else:
		v -= 1
print(v)


case = []
n = int(input())
for i in range(n):
	case.append(input().strip('X'))
q = ['++', '--']
l = 0
for i in case:
	if i in '++':
		l += 1
	elif i in '--':
		l -= 1
print(l)


inst_num = int(input())
result = 0
for i in range(inst_num):
	x = input()
	if x == 'X++' or x == '++X':
		result += 1
	elif x == 'X--' or x == '--X':
		result -= 1
print(result)


n = int(input())
ans = 0
for i in range(n):
	p = input()
	if '+' in p:
		ans += 1
	else:
		ans -= 1
print(str(ans))


n = int(input())
tot = int(0)
for i in range(n):
	w = str(input())
	s = list(w)
	tot += s.count('+') // 2
	tot -= s.count('-') // 2
print(tot)


out = 0
for i in range(int(input(''))):
	for c in input(''):
		if c == '+':
			out += 0.5
		if c == '-':
			out -= 0.5
print(int(out))


a = int(input())
k = 0
while a > 0:
	a = a - 1
	g = input()
	for i in g:
		if i == '+':
			k = k + 1
			break
		if i == '-':
			k = k - 1
			break
print(k)


t = int(input())
count = 0
for i in range(0, t):
	str1 = input()
	if '+' in str1:
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
x = 0
for i in range(n):
	string = input()
	if string.__contains__('-'):
		x = x - 1
	elif string.__contains__('+'):
		x = x + 1
print(x)


n = int(input())
operations = []
for i in range(n):
	operations.append(input())

def main():
	X = 0
	for operation in operations:
		if operation == 'X++' or operation == '++X':
			X = X + 1
		else:
			X = X - 1
	print(X)
main()


def f(s):
	if s[0] == '+':
		return 1
	if s[2] == '+':
		return 1
	if s[0] == '-':
		return -1
	if s[2] == '-':
		return -1
n = int(input())
result = 0
for i in range(n):
	string = input()
	result += f(string)
print(result)


N = int(input())
X = 0
for i in range(N):
	Statement = input()
	if '++' in Statement:
		X += 1
	else:
		X -= 1
print(X)


X = 0
n = int(input())
for i in range(n):
	state = input()
	p = state.count('++')
	m = state.count('--')
	X += p - m
print(X)


cantidad_veces = int(input())
res = 0
for repetir in range(cantidad_veces):
	ingreso_de_x = input()
	if '--' in ingreso_de_x:
		res -= 1
	elif '++' in ingreso_de_x:
		res += 1
print(res)


n = int(input(''))
l = list()
x = 0
for i in range(n):
	chi = input('')
	l.append(chi)
for i in range(n):
	if '+' in l[i]:
		x = x + 1
	else:
		x = x - 1
print(x)


class CodeforcesTask282ASolution:

	def __init__(self):
		self.result = ''
		self.n = 0
		self.instructions = []

	def read_input(self):
		self.n = int(input())
		for x in range(self.n):
			self.instructions.append(input())

	def process_task(self):
		x = 0
		for instr in self.instructions:
			if '-' in instr:
				x -= 1
			else:
				x += 1
		self.result = str(x)

	def get_result(self):
		return self.result
Solution = CodeforcesTask282ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


n = int(input())
X = 0
while n != 0:
	a = input()
	for i in range(len(a) - 1):
		if a[i] == a[i + 1] == '-':
			X -= 1
		elif a[i] == a[i + 1] == '+':
			X += 1
	n -= 1
print(X)


a = int(input())
h = 0
ch = 0
for i in range(a):
	b = input()
	if b == '++X' or b == 'X++':
		h += 1
	if b == '--X' or b == 'X--':
		h -= 1
print(h)


a = int(input())
c = 0
for i in range(a):
	ss = input()
	if ss == 'X++' or ss == '++X':
		c += 1
	else:
		c -= 1
print(c)


cnt = int(input())
ans = 0
for i in range(cnt):
	curr = input().split('X')
	if curr[0] == '++' or curr[1] == '++':
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
x = 0
i = 1
while i <= n:
	i += 1
	a = input()
	for j in range(len(a)):
		if a[j] == '+':
			x += 1
			break
		if a[j] == '-':
			x = x - 1
			break
print(x)


x = 0
for t in range(int(input())):
	tm = input()
	if tm[1] == '+':
		x += 1
	elif tm[1] == '-':
		x -= 1
print(x)


q = int(input())
w = 1
e = 0
while q >= w:
	r = input()
	if r.count('+') > 0:
		e = e + 1
	elif r.count('-') > 0:
		e = e - 1
	w = w + 1
print(e)


count_operations = int(input())
x = 0
for _ in range(count_operations):
	s = input()
	if s.count('++'):
		x += 1
	else:
		x -= 1
print(x)


stm_count = int(input())
res = 0
for i in range(0, stm_count):
	stmt = input()
	if '+' in stmt:
		res = res + 1
	else:
		res = res - 1
print(res)


final = 0
n = int(input())
for i in range(n):
	input_ = input()
	if '++' in input_:
		final += 1
	elif '--' in input_:
		final -= 1
print(final)


n = int(input())
l = {}
x = 0
for i in range(n):
	l[i] = input()
inc = '+'
dec = '-'
for i in range(n):
	if inc in l[i]:
		x = x + 1
	else:
		x = x - 1
print(x)


x = 0
n = int(input())
for i in range(n):
	c = input()
	if c.startswith('++X') or c.startswith('X++'):
		x = x + 1
	elif c.startswith('--X') or c.startswith('X--'):
		x = x - 1
print(x)


n = int(input())
i = 0
x = 0
data = []
while i < n:
	data.append(input())
	i = i + 1
for elem in data:
	if elem == 'X++' or elem == '++X':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
s = 0
for i in range(n):
	r = input().lower()
	if r == '++x' or r == 'x++':
		s += 1
	else:
		s -= 1
print(s)


n = int(input())
ops = []
for i in range(n):
	ops.append(input())
ans = 0
for i in range(n):
	if ops[i][1] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


x = 0
t = input()
t = int(t)
while t > 0:
	a = input()
	if a.find('++') > -1:
		x = x + 1
	elif a.find('--') > -1:
		x = x - 1
	t = t - 1
print(x)


t = int(input())
count = 0
for i in range(t):
	y = input()
	if y == '++X':
		count += 1
	elif y == 'X++':
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
temp_value = 0
for i in range(n):
	flag = str(input())[1]
	if flag == '+':
		temp_value += 1
	if flag == '-':
		temp_value -= 1
print(temp_value)


n = int(input())
ans = 0
for i in range(n):
	s = str(input())
	for i in range(len(s) - 1):
		if s[i] == '+' and s[i + 1] == '+':
			ans += 1
		if s[i] == '-' and s[i + 1] == '-':
			ans -= 1
print(ans)


x = 0
n = int(input())
for _ in range(n):
	m = input()
	if m[0] == '+' or m[-1] == '+':
		x = x + 1
	elif m[0] == '-' or m[-1] == '-':
		x = x - 1
print(x)


T = int(input())
x = 0
for _ in range(T):
	s = input()
	if s[0] == '+' or s[-1] == '+':
		x += 1
	else:
		x -= 1
print(x)


totalStatments = int(input())
x = 0
for counter in range(0, totalStatments, 1):
	operation = input()
	if operation.__contains__('++'):
		x += 1
	else:
		x -= 1
print(x)


t = int(input())
x = 0
for _ in range(t):
	q = input()
	q = set(q)
	if '+' in q:
		x += 1
	elif '-' in q:
		x -= 1
print(x)


n = int(input())
k = 0
while n != 0:
	n -= 1
	s = input()
	if '++' in s:
		k += 1
	else:
		k -= 1
print(k)


ans = int(input())
a = 0
ab = []
for i in range(ans):
	ae = input()
	ab.append(ae)
for b in ab:
	if b.find('++') != -1:
		a = a + 1
	elif b.find('--') != -1:
		a = a - 1
print(a)


ans = 0
testcases = int(input())
for i in range(testcases):
	a = input()
	if '++' in a:
		ans += 1
	elif '--' in a:
		ans -= 1
print(ans)


total = 0
n = int(input())
for i in range(n):
	operation = input()
	if operation.count('+') > 1:
		total += 1
	else:
		total -= 1
print(total)


n = int(input())
y = 0
for i in range(n):
	l = input()
	if l[0] == '+' or l[1] == '+':
		y = y + 1
	else:
		y = y - 1
print(y)


tc = int(input())
pe = 0
for i in range(0, tc):
	z = input()
	if '++' in z:
		pe = pe + 1
	if '--' in z:
		pe = pe - 1
print(pe)


no_of_instructions = int(input())
initial_value = 0
for i in range(0, no_of_instructions):
	instruction = input()
	if '+' in instruction:
		initial_value += 1
	if '-' in instruction:
		initial_value -= 1
print(initial_value)


x = 0
n = int(input())
for i in range(n):
	a_list = input()
	b = a_list.count('++')
	c = a_list.count('--')
	x = x + b - c
print(x)


str = input()
inpt = ''
n = int(str)
x = 0
for i in range(n):
	inpt = input()
	if inpt[0:2] == '++' or inpt[1:3] == '++':
		x += 1
	elif inpt[0:2] == '--' or inpt[1:3] == '--':
		x -= 1
print(x)


def bitOperation(totalBitOp):
	res = 0
	for i in totalBitOp:
		if '+' in i:
			res += 1
		if '-' in i:
			res -= 1
	return res
tc = int(input())
totalBitOp = []
for i in range(tc):
	bitOp = input()
	totalBitOp.append(bitOp)
print(bitOperation(totalBitOp))


t = int(input())
x = 0
for a in range(t):
	s = list(input())
	if '+' in s:
		x = x + 1
	elif '-' in s:
		x = x - 1
print(x)


n = int(input())
count = 0
for _ in range(n):
	op = str(input())
	if op[1] == '+':
		count += 1
	else:
		count -= 1
print(count)


x = 0
bitland = {'++X': 1, '--X': -1, 'X--': -1, 'X++': 1}
n = int(input())
for _ in range(n):
	x += bitland.get(input().upper())
print(x)


import sys
input = sys.stdin.readline

def main():
	n = int(input())
	ans = 0
	for _ in range(n):
		s = input()
		if '+' in s:
			ans += 1
		else:
			ans -= 1
	print(ans)
main()


x = 0
operations = {'++X': 'x+1', 'X++': 'x+1', '--X': 'x-1', 'X--': 'x-1'}
for _ in range(int(input())):
	x = eval(operations[str(input())])
print(x)


n = int(input())
statements = []
for i in range(n):
	statements.append(input().strip())
x = 0
for state in statements:
	if '+' in state:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
sum = 0
while n:
	n = n - 1
	inp = str(input().split())
	a = inp[2]
	b = inp[3]
	c = inp[4]
	for i in range(2, 5):
		if inp[i] == '+':
			sum = sum + 1
		elif inp[i] == '-':
			sum = sum - 1
if n == 0:
	print(sum // 2)


amount = int(input())
string = ''
for i in range(amount):
	string += input()
operators = list(string.replace('X', ''))
value = (operators.count('+') - operators.count('-')) // 2
print(value)


limit = int(input())
x = 0
count = 0
while count < limit:
	data = input()
	if '++' in data:
		x += 1
	else:
		x -= 1
	count += 1
print(x)


k = int(input())
ans = 0
for i in range(k):
	op = list(input().lower())
	op.remove('x')
	op = ''.join(op)
	if op == '++':
		ans = ans + 1
	else:
		ans = ans - 1
print(ans)


def main():
	nb_lines = int(input())
	lines = []
	for i in range(nb_lines):
		line = input()
		lines.append(line)
	program = ''.join(lines)
	x = 0
	i = 0
	while i < len(program):
		char = program[i]
		if char == 'X':
			i += 1
		elif char == '+':
			i += 2
			x += 1
		elif char == '-':
			i += 2
			x -= 1
	print(x, end='')
main()


a = int(input())
s = 0
for _ in range(a):
	n = input().replace('X', '')
	if n == '++':
		s += 1
	elif n == '--':
		s -= 1
print(s)


statements = int(input())
final = []
sum = 0
for i in range(0, statements):
	line = input()
	final.append(line)
for i in range(0, statements):
	if final[i] == '++X' or final[i] == 'X++':
		sum = sum + 1
	else:
		sum = sum - 1
print(sum)


n = int(input())
if n <= 150 and n >= 1:
	x = 0
	for i in range(0, n):
		p = input()
		if p == 'X++' or p == 'x++' or p == '++X' or (p == '++x'):
			x += 1
		else:
			x -= 1
	print(x)


a = input()
a = int(a)
c = 0
for i in range(a):
	f = input()
	if f == '++X' or f == 'X++':
		c += 1
	elif f == '--X' or f == 'X--':
		c -= 1
	else:
		c = c
print(c)


a = 0
su = 0
for _ in range(int(input())):
	s = input()
	for i in range(len(s)):
		if s[i] == '+':
			a += 1
		elif s[i] == '-':
			su += 1
x = a // 2
y = su // 2
print(x - y)


def x():
	n = int(input())
	x = 0
	for i in range(n):
		n_line = input()
		if '+' in n_line:
			x += 1
		if '-' in n_line:
			x -= 1
	return x
print(x())


operations = int(input())
i = 0
x = 0
while i < operations:
	cmd = input()
	if '++' in cmd:
		x += 1
	elif '--' in cmd:
		x -= 1
	i += 1
print(x)


times = int(input())
x = 0
for t in range(times):
	mai = input()
	if mai[0] == '+' or mai[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


N = int(input())
X = 0
for i in range(N):
	statement = str(input())
	if statement in ('X++', '++X'):
		X += 1
	elif statement in ('X--', '--X'):
		X += -1
print(X)


n = int(input())
ans = 0
a = []
for i in range(n):
	a.append(input())
for i in range(n):
	if '+' in a[i]:
		ans += 1
	elif '-' in a[i]:
		ans -= 1
print(ans)


num = int(input())
X = 0
for n in range(num):
	val = input().strip('X')
	if val == '++':
		X += 1
	else:
		X -= 1
print(X)


n = int(input())
r = 0
for i in range(n):
	s = input()
	if s.startswith('++') or s.endswith('++'):
		r += 1
	else:
		r -= 1
print(r)


n = int(input())
a = 0
b = 0
for i in range(n):
	line = input()
	for l in range(len(line)):
		if line[l] == '+':
			a += 1
		if line[l] == '-':
			b += 1
		if line[l] == 'X':
			pass
s = a / 2 - b / 2
print(int(s))


cnt = 0
for i in range(int(input())):
	s = input()
	if '++' in s and 'X':
		cnt += 1
	elif '--' in s and 'X':
		cnt -= 1
print(cnt)


j = int(input())
arreay = [input() for _ in range(j)]
x = 0
for i in arreay:
	if '-' in i:
		x -= 1
	else:
		x += 1
print(x)


n = int(input())
str = None
X = 0
for i in range(1, n + 1, 1):
	str = input().split('X')
	if '++' in str:
		X += 1
	else:
		X -= 1
print(X)


n = int(input())
x = 0
for i in range(n):
	statement = str(input())
	if '--' in statement:
		x -= 1
	elif '++' in statement:
		x += 1
	else:
		pass
print(x)


num_operator = int(input())
x = 0
for i in range(num_operator):
	operator = input()
	if '++' in operator:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
result = 0
for i in range(n):
	operation = str(input())
	if operation[0] == 'X':
		if operation[1] == '+':
			result += 1
		else:
			result -= 1
	elif operation[0] == '+':
		result += 1
	else:
		result -= 1
print(result)


def bit():
	n = int(input())
	programme = ''
	for l in range(n):
		programme = programme.__add__(input())
	plus = int(programme.count('+')) / 2
	minus = int(programme.count('-')) / 2
	return int(plus - minus)
print(bit())


a = int(input())
b = 0
for x in range(a):
	c = input()
	b = b + (-1, 1)['++' in c]
print(b)


n = int(input())
i = 1
dem = 0
while i <= n:
	s = input()
	if s == '++X':
		dem += 1
	elif s == 'X++':
		dem += 1
	elif s == 'X--':
		dem -= 1
	elif s == '--X':
		dem -= 1
	i += 1
print(dem)


n = int(input())
spisok = []
x = 0
for s in range(0, n):
	s = input()
	spisok.append(s)
for i in spisok:
	if i == '++X' or i == 'X++':
		x += 1
	elif i == 'X--' or i == '--X':
		x -= 1
print(x)


n = int(input())
b = []
t = 0
k = 0
while k < n:
	b = input()
	k = k + 1
	if '+' in b:
		t = t + 1
	if '-' in b:
		t = t - 1
print(t)


def main():
	n = int(input())
	statments = []
	x = 0
	for counter in range(0, n):
		statments.append(input())
	for counter in statments:
		yo = str(counter)
		if yo[0] == 'x' or ('X' and yo[1] == '+'):
			x = x + 1
		elif yo[0] == 'x' or ('X' and yo[1] == '-'):
			x = x - 1
		elif yo[0] == '-' and yo[2] == 'X' or 'x':
			x = x - 1
		elif yo[0] == '+' and yo[2] == 'X' or 'x':
			x = x + 1
	print(x)
main()


n = int(input())
s = ''
p = 0
m = 0
for i in range(n):
	s1 = input()
	s += s1
for j in s:
	if j == '+':
		p += 1
	if j == '-':
		m += 1
print(p // 2 - m // 2)


n = int(input())
num = 0
for i in range(n):
	cmd = input()
	if cmd == '++X' or cmd == '--X' or cmd == 'X++' or (cmd == 'X--'):
		if cmd == '++X' or cmd == 'X++':
			num = num + 1
		else:
			num = num - 1
print(num)


n = int(input())
start = 0
for i in range(n):
	job = input()
	if job == 'X++' or job == '++X':
		start += 1
	elif job == 'X--' or job == '--X':
		start -= 1
print(start)


n = int(input())
x = 0
for _ in range(0, n):
	l = list(input())
	if l[0] == '+' or l[2] == '+':
		x += 1
	elif l[0] == '-' or l[2] == '-':
		x -= 1
print(x)


n = int(input())
val = 0
if n >= 1 and n <= 150:
	for i in range(n):
		e = input()
		if e[0] == 'X' and e[1] == '+' and (e[2] == '+'):
			val += 1
		if e[0] == '+' and e[1] == '+' and (e[2] == 'X'):
			val += 1
		if e[0] == 'X' and e[1] == '-' and (e[2] == '-'):
			val -= 1
		if e[0] == '-' and e[1] == '-' and (e[2] == 'X'):
			val -= 1
	print(val)


N = int(input())
X = 0
for k in range(0, N):
	L = input()
	for i in L:
		A = L[0]
		B = L[2]
	if A == '+' or B == '+':
		X = X + 1
	elif A == '-' or B == '-':
		X = X - 1
print(X)


X = 0
for i in range(int(input())):
	s = input()
	if s.count('+') == 2:
		X += 1
	if s.count('-') == 2:
		X -= 1
print(X)


n = int(input())
st = []
for i in range(0, n):
	ele = str(input())
	st.append(ele)
X = 0
for i in range(0, n):
	for j in range(0, 3):
		if st[i][0] == '+':
			if st[i][1] == '+':
				if st[i][2] == 'X':
					X = X + 1
					break
		elif st[i][0] == 'X':
			if st[i][1] == '+':
				if st[i][2] == '+':
					X += 1
					break
		if st[i][0] == '-':
			if st[i][1] == '-':
				if st[i][2] == 'X':
					X = X - 1
					break
		elif st[i][0] == 'X':
			if st[i][1] == '-':
				if st[i][2] == '-':
					X -= 1
					break
print(X)


def bit(n):
	list1 = []
	X = 0
	for i in range(n):
		a = input()
		if 'X++' in a or '++X' in a:
			X += 1
		else:
			X -= 1
	print(X)
n = int(input())
bit(n)


times = int(input())
value = 0
for x in range(0, times):
	choice = input()
	if '-' in choice:
		value -= 1
	else:
		value += 1
print(value)


ip = int(input())
p = '+'
m = '-'
c = 0
for i in range(ip):
	ip = input()
	if p in ip:
		c += 1
	elif m in ip:
		c -= 1
print(c)


n = int(input(''))
cplus = '++X'
cplus__ = 'X++'
answer = 0
for i in range(n):
	choice = input('')
	if choice == cplus:
		answer += 1
	elif choice == cplus__:
		answer += 1
	else:
		answer = answer - 1
print(answer)


a = int(input())
p = 0
n = 0
for i in range(a):
	b = input()
	if b == 'X++' or b == '++X':
		p = p + 1
	if b == '--X' or b == 'X--':
		n = n - 1
print(p + n)


varc = int(input())
vars = [str(input()).lower() for i in range(varc)]
var_pos = 0
for var in vars:
	if var[0] == 'x':
		if var[-1] == '+':
			var_pos += 1
		else:
			var_pos -= 1
	elif var[0] == '+':
		var_pos += 1
	else:
		var_pos -= 1
print(var_pos)


def bit(string):
	length = len(string)
	ss = list(string)
	k = 0
	for i in range(length):
		if ss[i] == '+':
			k += 1
		elif ss[i] == '-':
			k -= 1
	return k
n = int(input())
x = 0
for i in range(n):
	string = input()
	if bit(string) == 2:
		x += 1
	if bit(string) == -2:
		x -= 1
print(x)


quantity = int(input())
strings = []
count = 0
for i in range(0, quantity):
	strings.append(input())
	if '++' in strings[i]:
		count += 1
	elif '--' in strings[i]:
		count -= 1
print(count)


c = 0
for i in range(int(input())):
	L = list(input())
	L.sort()
	if L[0] == '+':
		c += 1
	else:
		c -= 1
print(c)


(plus, minus, CP, CM) = (0, 0, 0, 0)
num = int(input())
str = []
for i in range(num):
	str.append(input())
for j in range(len(str)):
	for i in str[j]:
		if i == '+':
			plus = plus + 1
			if plus == 2:
				CP = CP + 1
				plus = 0
		if i == '-':
			minus = minus + 1
			if minus == 2:
				CM = CM + -1
				minus = 0
print(CP + CM)


cases = int(input())
count = 0
for case in range(cases):
	st = input()
	if '+' in st:
		count += 1
	elif '-' in st:
		count -= 1
print(count)


i = int(input())
init = 0
for j in range(0, i):
	st = input()
	if st == '--X' or st == 'X--':
		init -= 1
	elif st == '++X' or st == 'X++':
		init += 1
print(init)


from sys import stdin

def fun(lines):
	x = 0
	for op in lines[1:]:
		if '--' in op:
			x -= 1
		else:
			x += 1
	return str(x)
tests = [['1\n++X', '1'], ['2\nX++\n--X', '0']]
print(fun(stdin.readlines()))


lines = int(input())
x = 0
for line in range(lines):
	statement = input()
	if statement[0] == '+' or statement[2] == '+':
		x += 1
	if statement[0] == '-' or statement[2] == '-':
		x -= 1
print(x)


variable = int(input())
val = 0
for i in range(variable):
	string = input()
	if string[2] == '+' or string[0] == '+':
		val += 1
	else:
		val = val - 1
print(val)


count = 0
for i in range(int(input())):
	seq = input()
	if seq == '++X' or seq == 'X++':
		count += 1
	else:
		count -= 1
print(count)


count = int(input())
otvet = []
x = 0
for i in range(0, count):
	gg = input()
	if gg == 'X++' or gg == '++X':
		x += 1
	elif gg == '--X' or gg == 'X--':
		x -= 1
print(x)


t = int(input())
ans = 0
while t > 0:
	x = input()
	add = x.count('+')
	sub = x.count('-')
	if add == 2:
		ans += 1
	if sub == 2:
		ans -= 1
	t -= 1
print(ans)


n = int(input())
count = 0
for i in range(n):
	li = input()
	if li[0] == '+' or li[1] == '+':
		count += 1
	elif li[0] == '-' or li[1] == '-':
		count -= 1
print(count)


N = int(input())
x = 0
for _ in range(N):
	lst = input().strip()
	if '+' in lst:
		x += 1
	else:
		x -= 1
print(x)


i = input()
i = int(i)
x = 0

def plus(x):
	return x + 1

def sub(x):
	return x - 1
while i > 0:
	string = input()
	if string == 'X++' or string == '++X':
		x = plus(x)
	elif string == '--X' or string == 'X--':
		x = sub(x)
	i = i - 1
print(x)


i = input
X = 0
for _ in [0] * int(i()):
	s = i()
	if '++' in s:
		X += 1
	if '--' in s:
		X -= 1
print(X)


times = int(input())
answer = 0
for i in range(times):
	statement = input()
	if statement == '--X' or statement == 'X--':
		answer -= 1
	else:
		answer += 1
print(answer)


def problem282a(alist):
	x = 0
	for item in alist:
		if item == '++':
			x += 1
		elif item == '--':
			x -= 1
		else:
			raise ValueError('Item is not ++ or --')
	return x
n = int(input())
cmdList = []
for i in range(n):
	cmdList.append(input().strip('X'))
result = problem282a(cmdList)
print(result)


print(sum((44 - ord(input()[1]) for a in [0] * int(input()))))


s = 0
for i in range(int(input())):
	s += input()[1] == '+' or -1
print(s)


n = int(input())
total = 0
for i in range(n):
	x = input().split('X')
	if x[0] != '':
		if x[0] == '++':
			total += 1
		else:
			total -= 1
	elif x[1] == '++':
		total += 1
	else:
		total -= 1
print(total)


n = int(input())
s = 0
for i in range(n):
	state = input()
	if state.find('+') >= 0:
		s += 1
	elif state.find('-') >= 0:
		s -= 1
	else:
		x = state.find('X')
		x = state[x]
		s = int(x)
print(s)


def test_case(it):
	sum = 0
	for val in it:
		if val == '++X' or val == 'X++':
			sum += 1
			continue
		if val == '--X' or val == 'X--':
			sum -= 1
	print(sum)
n = int(input())
it = (input() for _ in range(n))
test_case(it)


repetition = int(input())
X = 0
for num in range(repetition):
	operation = input()
	if operation == 'X++' or operation == '++X':
		X = X + 1
	else:
		X = X - 1
print(X)


x = int(input())
t = 0
while x > 0:
	x -= 1
	k = input()
	if '+' in k:
		t += 1
	else:
		t -= 1
print(t)


n = input()
stats = []
for _ in range(int(n)):
	stats.append(input().split())
x = 0
for y in stats:
	if '++X' in y or 'X++' in y:
		x += 1
	elif '--X' in y or 'X--' in y:
		x -= 1
print(x)


import math
m = int(input())
x = 0
for i in range(0, m):
	s = str(input())
	if s == '--X':
		x = x - 1
	if s == 'X--':
		x = x - 1
	if s == '++X':
		x = x + 1
	if s == 'X++':
		x = x + 1
print(x)


a = int(input())
cal = []
c = 0
add = 'X++'
add2 = '++X'
sub = 'X--'
sub2 = '--X'
while c < a:
	cal.append(input())
	c = c + 1
c = 0
x = 0
while c < len(cal):
	if add == cal[c] or cal[c] == add2:
		x = x + 1
	if sub == cal[c] or cal[c] == sub2:
		x = x - 1
	c = c + 1
print(x)


t = int(input())
val = 0
while t != 0:
	s = input()
	if s[0] == '+' or s[-1] == '+':
		val = val + 1
	else:
		val = val - 1
	t = t - 1
print(val)


n = int(input())
o = []
for k in range(n):
	elemento = input()
	o.append(elemento)
x = 0
for k in range(len(o)):
	if o[k] == '++X' or o[k] == 'X++':
		x += 1
	else:
		x -= 1
print(x)


statements = []
while True:
	try:
		statements.append(input())
	except:
		break
x = 0
for statement in statements:
	if '++' in statement:
		x += 1
	elif '--' in statement:
		x -= 1
print(x)


X = 0
n = int(input())
i = 0
while i < n:
	i += 1
	stt = str(input())
	if stt[0] == '+' or stt[2] == '+':
		X += 1
	else:
		X -= 1
print(X)


n = int(input())
x = 0
while n > 0:
	stat = input()
	if '+' in stat:
		x += 1
	elif '-' in stat:
		x -= 1
	n -= 1
print(x)


n = int(input())
sum = 0
mas = ['++X', 'X++']
mas_min = ['X--', '--X']
for i in range(n):
	a = input()
	if a in mas:
		sum += 1
	if a in mas_min:
		sum -= 1
print(sum)


import re
tamanho = int(input())
total = 0
for x in range(0, tamanho):
	line = input()
	if line:
		m = re.search('([+-])', line)
		if m.group(1) == '+':
			total += 1
		elif m.group(1) == '-':
			total -= 1
print(total)


n = int(input())
s = 0
tr = 2
for i in range(n):
	a = input()
	for j in range(3):
		if a[j] == '+':
			tr = 1
		if a[j] == '-':
			tr = 0
	if tr == 1:
		s = s + 1
	if tr == 0:
		s = s - 1
print(s)


n = int(input())
x = 0
for _ in range(n):
	s = input()
	x += s.count('++')
	x -= s.count('--')
print(x)


n = int(input())
x = sum(((1, -1)['-' in input()] for i in range(n)))
print(x)


num = 0
a = int(input())
for i in range(a):
	b = input()
	if b.count('++') == 1:
		num += 1
	elif b.count('--') == 1:
		num -= 1
print(num)


def solve(str):
	counter = 0
	for s in str:
		if s == '++X' or s == 'X++':
			counter += 1
		if s == '--X' or s == 'X--':
			counter -= 1
	return counter
no_of_lines = int(input())
lines = ''
list_s = []
for i in range(no_of_lines):
	lines = input()
	list_s.append(lines)
print(solve(list_s))


actions = int(input(''))
x = 0
for i in range(0, actions):
	action = str(input(''))
	o = list(action)
	if '+' in o:
		x = x + 1
	elif '-' in o:
		x = x - 1
print(x)


n = int(input())
X = 0
for i in range(0, n):
	a = input()
	if a == '++X':
		X = X + 1
	elif a == 'X++':
		X = X + 1
	elif a == '--X':
		X = X - 1
	elif a == 'X--':
		X = X - 1
	else:
		print('invallid syntex')
print(X)


n = int(input())
lst = []
for i in range(n):
	x = input()
	lst.append(x)
a = lst.count('X++') + lst.count('++X')
b = lst.count('--X') + lst.count('X--')
print(a - b)


import sys
n = int(input())
count = 0
for i in range(0, n):
	s = sys.stdin.readline()
	if '++' not in s:
		count = count - 1
	else:
		count = count + 1
print(count)


ans = 0
for i in range(int(input())):
	s = list(input())
	ans += s.count('+') // 2 - s.count('-') // 2
print(ans)


lines = []
while True:
	try:
		lines.append(input())
	except EOFError:
		break
initial = 0
num_lines = int(lines[0])
while num_lines > 0:
	line = list(lines[num_lines])
	line = set(line)
	if '+' in line:
		initial = initial + 1
	if '-' in line:
		initial = initial - 1
	num_lines = num_lines - 1
print(initial)


ans = 0
for i in range(int(input())):
	s = input()
	if s.find('X') != -1 and s.find('+') != -1:
		ans += 1
	elif s.find('X') != -1 and s.find('-') != -1:
		ans -= 1
print(ans)


n = int(input())
op = []
for i in range(n):
	op.append(input())
x = 0
add = 0
sub = 0
for o in op:
	if o == 'X++' or o == '++X':
		add += 1
	elif o == 'X--' or o == '--X':
		sub += 1
print(x + add - sub)


n = int(input())
b = []
c = 0
for i in range(n):
	a = input()
	b.append(a)
for i in b:
	if i == '++X' or i == 'X++':
		c = c + 1
	else:
		c = c - 1
print(c)


n = int(input())
str = ''
x = 0
p = 0
m = 0
for i in range(n):
	str += input()
for el in str:
	if el == '+':
		p += 1
	if el == '-':
		m += 1
plus = p // 2
minus = m // 2
print(x + plus - minus)


h = int(input())
cn = 0
for _ in range(h):
	g = input()
	if g[0] == '+' or g[-1] == '+':
		cn += 1
	else:
		cn -= 1
print(cn)


try:
	n = int(input())
	c = 0
	for i in range(n):
		s = input()
		if '+' in s:
			c = c + 1
		elif '-' in s:
			c = c - 1
	print(c)
except Exception as e:
	pass


N = int(input())
cnt = 0
for i in range(0, N):
	C = input()
	if C[:2] == '++' or C[1:] == '++':
		cnt += 1
	if C[:2] == '--' or C[1:] == '--':
		cnt -= 1
print(cnt)


statements = int(input())
x = 0
plus = '++'
for i in range(statements):
	state = input()
	if plus in state:
		x = x + 1
	else:
		x = x - 1
print(x)


pos = 0
neg = 0
for x in range(int(input())):
	num = input()
	if num[1] == '+':
		pos += 1
	else:
		neg += 1
print(pos - neg)


y = []
x = int(input())
w = x
a = 0
while w > 0:
	w = w - 1
	y.append(input())
for i in y:
	if i == 'X++' or i == '++X':
		a += 1
	if i == 'X--' or i == '--X':
		a -= 1
print(int(a))


n = int(input())
x = 0
minus_str = '--'
plus_str = '++'
for i in range(n):
	tmp = input()
	for j in range(len(tmp) - 1):
		if tmp[j] + tmp[j + 1] == plus_str:
			x += 1
	for k in range(len(tmp) - 1):
		if tmp[k] + tmp[k + 1] == minus_str:
			x -= 1
print(x)


ans = 0
for x in range(int(input())):
	ans += input()[1] == '+' or -1
print(ans)


def main():
	n_op = int(input())
	x = 0
	for o in range(n_op):
		if '+' in input():
			x = x + 1
		else:
			x = x - 1
	return x
print(main())


def solution(n):
	x = 0
	for i in range(n):
		st = input()
		li = list(st)
		if li[0] == '+':
			x += 1
		elif li[-1] == '+':
			x += 1
		elif li[0] == '-':
			x -= 1
		else:
			x -= 1
	return x
n = int(input())
print(solution(n))


k = 0
for t in range(int(input())):
	a = input()
	if '+' in a:
		k += 1
	elif '-' in a:
		k -= 1
print(k)


n = int(input())
ans = 0
for i in range(n):
	st = str(input())
	if st[0] == '+' or st[2] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


n = input()
n = int(n)
x = 0
c = None
for i in range(0, n):
	if c == '+':
		x = x + 1
	elif c == '-':
		x = x - 1
	c = None
	temp = input()
	if temp == '++X':
		x = x + 1
	elif temp == '--X':
		x = x - 1
	elif temp == 'X++':
		c = '+'
	else:
		c = '-'
if c == '+':
	x = x + 1
elif c == '-':
	x = x - 1
print(x)


lines = int(input())
x = 0
if 1 <= lines <= 150:
	list = []
	for i in range(lines):
		list += input().split()
		if list[i] == 'X++' or list[i] == '++X':
			x += 1
		elif list[i] == 'X--' or list[i] == '--X':
			x -= 1
	print(x)


import sys
theList = []
for line in sys.stdin:
	theList.append(line)
counter = 0
for elem in theList[1:]:
	if '+' in elem:
		counter = counter + 1
	else:
		counter = counter - 1
print(str(counter))


m = int(input())
count = 0
lst = []
for i in range(m):
	n = input()
	lst.append(n)
for j in range(len(lst)):
	if lst[j] == 'X++' or lst[j] == '++X':
		count = count + 1
	else:
		count = count - 1
print(count)


n = int(input())
L = [str(input()) for _ in range(n)]
r = 0
for k in range(n):
	if L[k][1] == '+':
		r += 1
	else:
		r -= 1
print(r)


n = int(input())
x = 0
for _ in range(n):
	ch = input()
	l = list(ch)
	x += l.count('+') // 2
	x -= l.count('-') // 2
print(x)


n = int(input())
c = 0
for i in range(n):
	str = input()
	lst = list(str)
	if lst.count('+') == 2:
		c += 1
	else:
		c -= 1
print(c)


n = int(input())
counter = 0
res = 0
while counter < n:
	val = input()
	if val == '++X' or val == 'X++':
		res += 1
	else:
		res -= 1
	counter += 1
print(res)


n = int(input())
result = 0
while n > 0:
	result += 1 if '++' in input() else -1
	n -= 1
print(result)


n = int(input())
s1 = '++'
s2 = '--'
c = 0
for i in range(n):
	k = input()
	if s1 in k:
		c += 1
	else:
		c -= 1
print(c)


import math
from collections import defaultdict
from collections import Counter
import itertools
t = int(input())
x = 0
while t:
	in_ = input()
	if '++' in in_:
		x += 1
	elif '--' in in_:
		x -= 1
	t -= 1
print(x)


cnt = 0
for _ in range(int(input())):
	x = input()
	if '++' in x:
		cnt += 1
	if '--' in x:
		cnt -= 1
print(cnt)


p1 = '++X'
p2 = 'X++'
n1 = '--X'
n2 = 'X--'
n = int(input())
count = 0
while n:
	s = input()
	if s == p1 or s == p2:
		count += 1
	else:
		count -= 1
	n -= 1
print(count)


num = int(input())
x = 0
for i in range(0, num):
	tmp = str(input())
	if '++' in tmp:
		x += 1
	elif '--' in tmp:
		x -= 1
	else:
		pass
print(x)


var = int(input())
sum = 0
for x in range(var):
	line = input()
	if line[0] == 'X':
		if line[1] == '+':
			sum += 1
		else:
			sum -= 1
	elif line[0] == '+':
		sum += 1
	else:
		sum -= 1
print(sum)


n = int(input())
x = 0
for _ in range(n):
	line = input().replace('X', '')
	if line == '++':
		x += 1
	else:
		x -= 1
print(x)


p = input
s = [p().replace('X', '') for i in ' ' * int(p())]
print(s.count('++') - s.count('--'))


n = int(input())
l = []
for i in range(n):
	l.append(input())
dict = {'X++': 0, '++X': 0, '--X': 0, 'X--': 0}
for i in range(len(l)):
	dict['X--'] = l.count('X--')
	dict['X++'] = l.count('X++')
	dict['++X'] = l.count('++X')
	dict['--X'] = l.count('--X')
answer = dict['X++'] + dict['++X'] - (dict['X--'] + dict['--X'])
print(answer)


n = int(input())
s = 0
for i in range(n):
	ch = input()
	j = 0
	while 1:
		if ch[j] == '+':
			s = s + 1
			break
		elif ch[j] == '-':
			s = s - 1
			break
		j = j + 1
print(s)


t = int(input())
count = 0
for i in range(t):
	a = input()
	if a[0] == '+' or a[1] == '+':
		count += 1
	else:
		count -= 1
print(count)


x = int(input())
ans = 0
for i in range(1, x + 1):
	y = input()
	for j in y:
		if j == '+':
			ans += 0.5
		elif j == '-':
			ans -= 0.5
print(int(ans))


n = int(input())
x = 0
for _ in range(n):
	ops = input()
	if ops[:2] == '++' or ops[1:] == '++':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
stats = []
for x in range(0, n):
	stats.append(input())
cont = 0
for l in stats:
	for x in l:
		if x == '+':
			cont += 0.5
		elif x == '-':
			cont -= 0.5
print(int(cont))


x = 0
times = int(input())
for i in range(times):
	state = input()
	if '++' in state:
		x += 1
	else:
		x -= 1
print(x)


res = 0
for t in range(int(input())):
	s = input()
	a = '++'
	b = '--'
	if s.count(a) > 0:
		res += s.count(a)
	if s.count(b) > 0:
		res -= s.count(b)
print(res)


n = int(input())
x = 0
while n:
	a = input()
	if a.find('++') != -1:
		x += 1
	if a.find('--') != -1:
		x -= 1
	n -= 1
print(x)


g = 0
t = int(input())
for i in range(t):
	s = input()
	if s[1] == '+' or s[0] == '+':
		g = g + 1
	if s[1] == '-' or s[0] == '-':
		g = g - 1
print(g)


result = 0
n = int(input())
lines = []
for i in range(n):
	line = input()
	if line:
		lines.append(line)
for i in lines:
	if '++' in i:
		result += 1
	if '--' in i:
		result -= 1
print(result)


n = int(input())
x = 0
operations = []
for i in range(n):
	operations.append(i)
	operations[i] = str(input())
plus = operations.count('++X') + operations.count('X++')
minus = operations.count('--X') + operations.count('X--')
total = x + plus - minus
print(total)


x = int(input())
number = 0
for a in range(x):
	statement = input()
	if statement == '++X':
		number += 1
	elif statement == 'X++':
		number += 1
	elif statement == 'X--':
		number -= 1
	elif statement == '--X':
		number -= 1
print(number)


n = int(input())
x = 0
for i in range(n):
	p = input()
	a = p.find('++')
	if a >= 0:
		x += 1
	else:
		x -= 1
print(x)


x = int(input())
inp = []
for i in range(x):
	y = input()
	inp.append(y)
ans = 0
for i in inp:
	if i == '++X' or i == 'X++':
		ans += 1
	elif i == '--X' or i == 'X--':
		ans -= 1
print(ans)


n = int(input())
ans = 0
while n:
	a = input()
	if a[1] == '+':
		ans += 1
	else:
		ans -= 1
	n -= 1
print(ans)


n = int(input())
sum = 0
for i in range(0, n):
	oi = str(input())
	if '++' in oi:
		sum += 1
	else:
		sum -= 1
print(sum)


n = int(input())
t = 0
if n >= 1 and n <= 150:
	for i in range(n):
		s = input()
		if s == '++X' or s == 'X++':
			t = t + 1
		elif s == '--X' or s == 'X--':
			t = t - 1
	print(t)


n = int(input())
number = 0
for i in range(n):
	my_string = input()
	for harf in my_string:
		if harf == '+':
			number += 1
			break
		elif harf == '-':
			number -= 1
			break
print(number)


n = int(input())
value = 0
for i in range(n):
	l = input()
	for i in range(len(l)):
		if l[i:i + 2] == '++':
			value += 1
		if l[i:i + 2] == '--':
			value -= 1
print(value)


Line = int(input(''))
x = 0
for i in range(Line):
	s = list(input(''))
	if s[1] == 'X':
		if s[0] == '+':
			x += 1
		elif s[0] == '-':
			x -= 1
	elif s[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
a = 0
for i in range(n):
	m = input()
	a += ('++' in m) - ('--' in m)
print(a)


def operation(a):
	x = 0
	for i in range(0, a):
		s = input()
		if s[0] == '+' or s[1] == '+':
			x += 1
		elif s[0] == '-' or s[1] == '-':
			x -= 1
	print(x)
a = int(input())
operation(a)


r = int(input())
d = 0
for i in range(r):
	x = input()
	if '++' in x:
		d = d + 1
	if '--' in x:
		d = d - 1
print(d)


a = int(input())
k = 0
while a > 0:
	a = a - 1
	g = input()
	for i in g:
		if i == '+':
			k = k + 1
			break
		elif i == '-':
			k = k - 1
			break
		else:
			continue
print(k)


t = int(input())
x = 0
for i in range(t):
	str = input()
	if str[0] == '+' or str[2] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
S = []
for i in range(n):
	s = input()
	S.append(s)
T1 = ['X++', '++X']
T2 = ['X--', '--X']
c = 0
for i in S:
	if i in T1:
		c += 1
	if i in T2:
		c -= 1
print(c)


n = int(input())
gc = 0
while n > 0:
	n -= 1
	str = input()
	if '++' in str:
		gc += 1
	else:
		gc -= 1
print(gc)


n = int(input())
s = 0
for i in range(n):
	a = input()
	for i in range(len(a)):
		if a[i] == '+':
			s += 1
			break
		if a[i] == '-':
			s -= 1
			break
print(s)


no_of_lines = int(input())
lines = ''
output = 0
for i in range(no_of_lines):
	lines += input() + ' '
for i in lines:
	if i == '+':
		output += 0.5
	elif i == '-':
		output -= 0.5
print(int(output))


s = int(input())
z = 0
for i in range(s):
	p = input()
	if p == '++X' or p == 'X++':
		z += 1
	else:
		z -= 1
print(z)


a = 0
bit = []
n = int(input())
for i in range(0, n):
	y = input()
	if y == 'X++':
		z = 1
	elif y == '++X':
		z = 1
	elif y == '--X':
		z = -1
	elif y == 'X--':
		z = -1
	bit.append(z)
for j in range(0, n):
	a = a + bit[j]
print(a)


counter = input()
x_val = 0
for i in range(int(counter)):
	statement = input()
	if statement[0] == '+' or statement[1] == '+':
		x_val += 1
	else:
		x_val -= 1
print(x_val)


kolvo = int(input())
x = 0
for i in range(0, kolvo):
	op = input()
	if op == 'X++' or op == '++X':
		x += 1
	elif op == '--X' or op == 'X--':
		x -= 1
print(x)


a = int(input())
b = 0
for k in range(a):
	c = input()
	if c == '++X' or c == 'X++':
		b += 1
	else:
		b -= 1
print(b)


n = int(input())
count = 0
for i in range(n):
	a = input()
	if a[0] == '+' or a[len(a) - 1] == '+':
		count += 1
	else:
		count -= 1
print(count)


numberOfStatemnts = int(input())
x = 0
for i in range(numberOfStatemnts):
	statement = input()
	if '++' in statement:
		x += 1
	elif '--' in statement:
		x -= 1
print(x)


def stringtask(n):
	x = 0
	for i in range(n):
		op = input()
		if op == 'X++' or op == '++X':
			x += 1
		else:
			x -= 1
	print(x)
n = int(input())
stringtask(n)


ct = 0
for _ in range(int(input())):
	s = input()
	if s[0] == '+' or s[1] == '+':
		ct += 1
	else:
		ct -= 1
print(ct)


n = int(input())
tmp = []
res = 0
for i in range(n):
	a = input()
	tmp.append(a)
for i in tmp:
	if '+' in i:
		res += 1
	else:
		res -= 1
print(res)


n = int(input())
c = 1
f = 'X++'
g = '++X'
h = '--X'
j = 'X--'
y = 0
while c <= n:
	a = input()
	if a == g:
		y = y + 1
	elif a == f:
		y = y + 1
	elif a == h:
		y = y - 1
	elif a == j:
		y = y - 1
	c = c + 1
print(y)


number = int(input())
arr = []
i = 0
for item in range(number):
	item = input()
	arr.append(item)
for item in arr:
	if item[1] == '+':
		i += 1
	else:
		i -= 1
print(i)


def solve():
	res = 0
	for i in range(int(input())):
		S = str(input())
		if S == '++X' or S == 'X++':
			res += 1
		else:
			res -= 1
	print(res)
Testcase = 1
for _ in range(Testcase):
	solve()


ans = 0
for i in range(int(input())):
	s = input()
	if s == 'X++' or s == '++X':
		ans += 1
	if s == 'X--' or s == '--X':
		ans -= 1
print(ans)


try:
	n = int(input())
	x = 0
	stmt = []
	for i in range(n):
		stmt.append(input())
	for i in range(n):
		if '--' in stmt[i]:
			x -= 1
		elif '++' in stmt[i]:
			x += 1
	print(x)
except Exception as e:
	print(e)


tc = int(input())
val = 0
for i in range(tc):
	s = str(input())
	if s[1] == '+':
		val += 1
	else:
		val -= 1
print(val)


n = int(input())
x = 0
i = 1
s = []
for i in range(n):
	t = input()
	s.append(t)
j = 0
l = len(s)
for j in range(l):
	if s[j] == 'X++' or s[j] == '++X':
		x += 1
	elif s[j] == '--X' or s[j] == 'X--':
		x -= 1
	else:
		print('Invalid Operation')
print(x)


n = int(input())
x = 0
i = 0
while i in range(n):
	p = str(input())
	if p == '++X':
		x = 1 + x
	elif p == 'X++':
		x = x + 1
	elif p == '--X':
		x = x - 1
	else:
		x = x - 1
	i += 1
print(x)


number_of_operations = int(input())
counter_x = 0
for i in range(number_of_operations):
	operation = input()
	if '--' in operation:
		counter_x -= 1
	else:
		counter_x += 1
print(counter_x)


z = int(input())
r = 0
for i in range(z):
	w = input()
	if w == '++x' or w == 'x++' or w == '++X' or (w == 'X++'):
		r += 1
	elif w == '--x' or w == 'x--' or w == '--X' or (w == 'X--'):
		r -= 1
print(r)


input_1 = input()
n = 0
x = 0
while n < int(input_1):
	input_2 = input()
	if input_2 == '++X' or input_2 == 'X++':
		x += 1
	elif input_2 == '--X' or input_2 == 'X--':
		x -= 1
	n += 1
print(x)


import sys
n = 0
final_sum = 0
for (i, l) in enumerate(sys.stdin):
	line = l.rstrip()
	if i == 0:
		n = int(line)
		continue
	if line[1] == '+':
		final_sum += 1
	else:
		final_sum -= 1
print(final_sum)


def make_operation(line):
	global x
	if line == 'X++' or line == '++X':
		x += 1
	else:
		x -= 1
x = 0
lines = int(input())
for i in range(lines):
	current = input()
	make_operation(current)
print(x)


i = int(input())
j = i - 1
list = []
global a
global x
a = 0
x = 0
c = '+'
d = '-'
while i > 0:
	list.append(input())
	i -= 1

def check(y):
	global x
	if '+' in list[y]:
		x += 1
	elif '-' in list[y]:
		x -= 1
while j > -1:
	check(j)
	j -= 1
print(x)


c = int(input())
x = 0
for i in range(0, c):
	mas = input()
	w = len(mas) - 1
	if mas[0] == '+' or mas[w] == '+':
		x += 1
	else:
		x -= 1
print(x)


iterations = int(input())
x = 0
for i in range(iterations):
	iteration = input()
	if '-' in iteration:
		x -= 1
	else:
		x += 1
print(x)


X = 0
liste = []
w = int(input())
for i in range(w):
	value = input()
	liste.append(value)
for m in liste:
	if '+' in m:
		X += 1
	else:
		X -= 1
print(X)


x = int(input())
b = 0
k = 0
while b < x:
	l = input()
	if '+' in l:
		k += 1
	else:
		k -= 1
	b += 1
print(k)


s1 = ''
for _ in range(int(input())):
	s = input()
	for i in s:
		if i == 'x':
			pass
		else:
			s1 += i
a = s1.count('+') / 2
b = s1.count('-') / 2
print(int(a - b))


n_str = input()
n = int(n_str)
answer = 0
for i in range(n):
	operation_str = input()
	if operation_str == '++X' or operation_str == 'X++':
		answer += 1
	else:
		answer -= 1
print(answer)


ans = 0
for _ in range(int(input())):
	x = list(input())
	if x[0] == '+' or x[2] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
o = [input() for _ in range(n)]
x = 0
for z in o:
	if '++' in z:
		x += 1
	elif '--' in z:
		x -= 1
print(x)


n = int(input())
count = 0
for i in range(n):
	a = list(input().strip().split('X'))
	for j in range(len(a)):
		if a[j] == '++':
			count = count + 1
		elif a[j] == '--':
			count = count - 1
print(count)


i = int(input())
res = 0
while i > 0:
	s = input()
	if s[1] == '+':
		res += 1
	else:
		res -= 1
	i -= 1
print(res)


n = int(input())
x = 0
while True:
	if n == 0:
		break
	n -= 1
	s = list(input())
	i = 0
	for i in s:
		if i == '+':
			x += 1
			break
		if i == '-':
			x -= 1
			break
print(x)


n = int(input())
x = 0
for i in range(n):
	a = input()
	for j in range(2):
		if a[j] == '+' and a[j + 1] == '+':
			x = x + 1
		if a[j] == '-' and a[j + 1] == '-':
			x = x - 1
print(x)


caracteres = ['+', '-', 'X']
correspondances = [1, -1, 0]

def valeur(a):
	answer = 0
	for i in a:
		answer += correspondances[caracteres.index(i)]
	if answer > 0:
		return 1
	elif answer < 0:
		return -1
	else:
		return 0
x = 0
instruction = []
operations = int(input(''))
for i in range(operations):
	instruction.append(input(''))
for i in range(len(instruction)):
	x += valeur(instruction[i])
print(x)


x = 0
print('\n')
n = int(input())
for item in range(n):
	statment = input()
	if statment == '++X' or statment == 'X++':
		x += 1
	if statment == '--X' or statment == 'X--':
		x -= 1
print(x)


n = int(input())
list_ = []
for i in range(n):
	increment = str(input())
	list_.append(increment)
add = 0
subtract = 0
for j in list_:
	if j == '++X' or j == 'X++':
		add = add + 1
	else:
		subtract = subtract + 1
print(add - subtract)


t = int(input())
X = 0
for i in range(t):
	c = input()
	if c == '++X':
		X += 1
	elif c == '--X':
		X -= 1
	elif c == 'X++':
		X += 1
	elif c == 'X--':
		X -= 1
	else:
		exit()
print(X)


def user_input():
	operation = input().lower()
	return operation
x = 0
n = int(input())
commands = []
for i in range(n):
	commands.append(user_input())
for command in commands:
	if command == 'x++' or command == '++x':
		x += 1
	if command == 'x--' or command == '--x':
		x -= 1
print(x)


n = int(input())
m = 0
for i in range(n):
	s = input()
	if '++' in s:
		m += 1
	elif '--' in s:
		m -= 1
	else:
		pass
print(m)


x = 0
n = int(input())
for j in range(n):
	command = input()
	if command in ['--X', 'X--']:
		x = x - 1
	else:
		x = x + 1
print(x)


def bitland():
	res = 0
	n = int(input())
	for _ in range(n):
		operation = input()
		if operation == '++X' or operation == 'X++':
			res += 1
		else:
			res -= 1
	print(res)
bitland()


n = int(input())
a = [input() for i in range(n)]
sum1 = 0
for j in a:
	sum1 = sum1 + j.count('++') - j.count('--')
print(sum1)


n = int(input())
ans = 0
for i in range(n):
	cnta = 0
	cnts = 0
	L = input()
	for s in L:
		if s == '+':
			cnta += 1
		elif s == '-':
			cnts += 1
	if cnta == 2:
		ans += 1
	elif cnts == 2:
		ans -= 1
print(ans)


n = int(input().strip())
Result = 0
for i in range(0, n):
	st = input().strip()
	if st[:2] == '++' or st[-2:] == '++':
		Result += 1
	elif st[:2] == '--' or st[-2:] == '--':
		Result -= 1
print(Result)


n = int(input())
number = 0
for i in range(n):
	operation = str(input())
	if 'X++' == operation or '++X' == operation:
		number += 1
	elif 'X--' == operation or '--X' == operation:
		number -= 1
print(number)


t = int(input())
l = []
for i in range(t):
	n = input()
	l.append(n)
s = 0
for i in range(len(l)):
	if l[i][0:1] == '+' or l[i][1:2] == '+':
		s += 1
	if l[i][0:1] == '-' or l[i][1:2] == '-':
		s -= 1
print(s)


print(sum((input().count('+') - 1 for _ in range(int(input())))))


n = int(input())
x = 0
for ii in range(n):
	a = input()
	s = []
	for i in str(a):
		s.append(i)
	for i in range(len(s) - 1):
		if s[i] == '+' and s[i + 1] == '+':
			x += 1
		elif s[i] == '-' and s[i + 1] == '-':
			x -= 1
print(x)


x = 0
inputnumbers = int(input())
input
for i in range(0, inputnumbers):
	operation = input()
	if operation.__contains__('++'):
		x += 1
	elif operation.__contains__('--'):
		x -= 1
print(x)


a = int(input())
s = ''
for i in range(a):
	b = input()
	s += b
print(s.count('++') - s.count('--'))


d = {'++X': 1, 'X++': 1, 'X--': 0, '--X:': 0}
x = 0
for _ in range(int(input())):
	s = input()
	if d.get(s):
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
c = 0
d = 0
while c != n:
	x = input()
	if x == 'X++' or x == '+X+' or x == '++X':
		d = d + 1
	elif x == 'X--' or x == '-X-' or x == '--X':
		d = d - 1
	else:
		pass
	c = c + 1
print(d)


numbers = [int(n) for n in input().split()]
n = numbers[0]
sub1 = '++'
sub2 = '--'
count = 0
for i in range(n):
	numbers = [n for n in input().split()]
	nums = str(numbers)
	if sub1 in nums:
		count += 1
	if sub2 in nums:
		count -= 1
print(count)


n = int(input())
x = 0
for z in range(n):
	statement = input()
	if statement[0] == '+' or statement[2] == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


x = 0
i = int(input())
while i > 0:
	s = input()
	if '++' in s:
		x += 1
	else:
		x -= 1
	i -= 1
print(x)


x = 0
for I in range(int(input())):
	s = input()
	if '++' in s:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
count = 0
for i in range(n):
	m = input()
	if m == 'X++' or m == '++X':
		count += 1
	elif m == 'X--' or m == '--X':
		count -= 1
	else:
		pass
print(count)


n = int(input())
final_value = 0
for i in range(n):
	holder = input()
	if '++' in holder:
		final_value += 1
	else:
		final_value -= 1
print(final_value)


x = 0
T = int(input())
for i in range(T):
	s = input()
	if s[0] == '+' or s[2] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
s = [] * n
x = 0
for _ in range(n):
	p = input()
	s.append(p)
for i in s:
	if i == 'X++' or i == '++X':
		x += 1
	else:
		x -= 1
print(x)


a = int(input())
s = 0
for i in range(a):
	a = input()
	if a[0] == '+':
		s = s + 1
	elif a[0] == '-':
		s = s - 1
	elif a[2] == '+':
		s += 1
	else:
		s -= 1
print(s)


(c1, c2) = (0, 0)
for _ in range(int(input())):
	s = input()
	if s == '++X' or s == 'X++':
		c1 += 1
	elif s == '--X' or s == 'X--':
		c2 += 1
print(c1 - c2)


n = int(input())
s = 0
while n > 0:
	d = input()
	if d[1] == '+':
		s += 1
	else:
		s -= 1
	n -= 1
print(s)


X = 0
num_times = int(input())
for k in range(num_times):
	statement = input()
	if statement == 'X++' or statement == '++X':
		X += 1
	elif statement == 'X--' or '--X':
		X += -1
print(X)


num = int(input())
somaF = 0
for i in range(num):
	string = str(input())
	x = string.find('++')
	y = string.find('--')
	if x >= 0:
		somaF += 1
	if y >= 0:
		somaF -= 1
print(somaF)


def bit():
	n = int(input())
	x = 0
	for i in range(n):
		s = input()
		if '++' in s:
			x = x + 1
		if '--' in s:
			x = x - 1
	print(x)
bit()


n = int(input())
X = 0
for i in range(n):
	nn = input()
	while nn != 'X++' and nn != '++X' and (nn != 'X--') and (nn != '--X'):
		nn = input()
	if nn == 'X++' or nn == '++X':
		X += 1
	if nn == 'X--' or nn == '--X':
		X -= 1
print(X)


lines = int(input())
x = 0
for i in range(0, lines):
	combination = input()
	if combination.find('++') >= 0:
		x = x + 1
	elif combination.find('--') >= 0:
		x = x - 1
print(x)


__author__ = 'Dan'
n = int(input())
x = 0
for i in range(0, n):
	y = input()
	if '+' in y:
		x += 1
	else:
		x -= 1
	i += 1
print(x)


x = 0
n = int(input().strip())
for _ in range(n):
	stmt = input().strip()
	if '++' in stmt:
		x += 1
	elif '--' in stmt:
		x -= 1
print(x)


t = int(input())
x = 0
for tests in range(t):
	operator = input()[1]
	if operator == '+':
		x += 1
	if operator == '-':
		x -= 1
print(x)


n = input()
t = 0
s = []
for i in range(int(n)):
	s = input()
	sorted(s)
	if s == 'X++':
		t = t + 1
	elif s == '++X':
		t = t + 1
	elif s == '--X':
		t = t - 1
	elif s == 'X--':
		t = t - 1
print(t)


def main():
	n = int(input())
	print(solve(n))

def solve(n):
	res = 0
	for _ in range(n):
		st = input()
		if '+' in st:
			res += 1
		else:
			res -= 1
	return res
main()


def fun():
	n = int(input())
	x = 0
	while n > 0:
		s = input()
		if s == 'X++' or s == '++X':
			x += 1
		else:
			x -= 1
		n -= 1
	print(x)
fun()


val = 0
num_of_operations = int(input(''))
for s in range(num_of_operations):
	op = input()
	if '+' in op:
		val += 1
	else:
		val -= 1
print(val)


k = int(input())
x = 0
f = 'o'
while k:
	k -= 1
	f = input()
	if f.__contains__('--'):
		x -= 1
	else:
		x += 1
print(x)


n = int(input())
count = 0
if n >= 1 and n <= 150:
	for i in range(n):
		elec = input()
		if elec == 'X++' or elec == '++X':
			count += 1
		else:
			count -= 1
	print(count)


n = int(input())
sum1 = 0
for i in range(n):
	str1 = input()
	if str1[1] == '+':
		sum1 += 1
	else:
		sum1 -= 1
print(sum1)


import sys
line = sys.stdin.readline()
line = line[:-1]
n = int(line)
result = 0
for i in range(n):
	line = sys.stdin.readline()
	op = line[:-1]
	if op[1] == '+':
		result = result + 1
	else:
		result = result - 1
print(result)


n = int(input())
c = 0
plus = ['X++', '++X']
minus = ['X--', '--X']
for _ in range(0, n):
	i = input()
	if i in plus:
		c += 1
	elif i in minus:
		c -= 1
print(c)


def fnc(s, x):
	if s[0] == '-' or s[2] == '-':
		x = x - 1
	if s[0] == '+' or s[2] == '+':
		x = x + 1
	return x
t = int(input())
x = 0
for i in range(t):
	s = input()
	x = fnc(s, x)
print(x)


import re
import math
n = int(input())
c = 0
for i in range(n):
	l = input()
	if '+' in l:
		c += 1
	else:
		c -= 1
print(c)


t = int(input())
x = 0
for i in range(0, t):
	n = input()
	minus = n.count('-') // 2
	plus = n.count('+') // 2
	x += plus
	x -= minus
print(x)


n = int(input())
count = 0
while n:
	s = input()
	if '++' in s:
		count += 1
	elif '--' in s:
		count -= 1
	n = n - 1
print(count)


n = int(input())
x = 0
command = {'++X': 1, 'X++': 1, '--X': -1, 'X--': -1}
for i in range(n):
	s = input()
	x += command[s]
print(x)


n = int(input())
count = 0
for _ in range(n):
	oper = input()
	count += 1 if '++' in oper else -1 if '--' in oper else 0
print(count)


n = int(input())
x = 0
operations = []
OPERATION = {'plus': '++', 'minus': '--'}
for i in range(n):
	operation = input()
	operations.append(operation)
for operation in operations:
	if OPERATION['plus'] in operation:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
a = []
res = int(0)
for i in range(n):
	st = input()
	if st[0] == '+' or st[2] == '+':
		res += 1
	else:
		res -= 1
print(res)


B = [input() for i in range(int(input()))]
for i in range(len(B)):
	if B[i] == 'X++' or B[i] == '++X':
		B[i] = int(1)
	else:
		B[i] = int(-1)
print(sum(B))


a = int(input())
c = 0
i = 0
while i < a:
	b = str(input())
	if b == '++X' or b == 'X++':
		c += 1
	if b == '--X' or b == 'X--':
		c -= 1
	i += 1
print(c)


from sys import stdin, stdout
number = int(stdin.readline())
value = 0
lines = stdin.readlines()
for line in lines:
	if line[0].lower() == 'x':
		if line[1].lower() == '+':
			value += 1
		else:
			value -= 1
	elif line[0].lower() == '+':
		value += 1
	else:
		value -= 1
print(value)


n = int(input())
s = ' '
for i in range(n):
	s = s + str(input())
x = (s.count('+') - s.count('-')) / 2
print(int(x))


a = int(input())
x = 0
i = 0
while i < a:
	b = str(input())
	if 'X' in b:
		if '++' in b:
			x = x + 1
		elif '--' in b:
			x = x - 1
	i = i + 1
print(x)


x = int(input())
plus = 0
minus = 0
for n in range(x):
	bit = input()
	for word in bit:
		if word == '+':
			plus += 1
		elif word == '-':
			minus += 1
plus = plus / 2
minus = minus / 2
print(int(plus - minus))


number_str = int(input())
string = []
answer = 0
for i in range(number_str):
	string.append(input())
for i in string:
	if i.find('++X') != -1 or i.find('X++') != -1:
		answer += 1
	if i.find('--X') != -1 or i.find('X--') != -1:
		answer -= 1
print(answer)


x = int(input())
inc = 0
while x > 0:
	y = input()
	if '+' in y:
		inc += 1
	else:
		inc -= 1
	x -= 1
print(inc)


n = int(input())
sum = 0
for i in range(n):
	op = input()
	sum = sum + (44 - ord(op[1]))
print(sum)


X = 0
n = int(input())
while not 1 <= n <= 150:
	n = int(input())
for i in range(n):
	a = input()
	while a == '':
		a = input()
	while not (a == 'X++' or a == '++X' or a == 'X--' or (a == '--X')):
		a = input()
	if a == 'X++' or a == '++X':
		X += 1
	elif a == 'X--' or a == '--X':
		X -= 1
print(X)


w = input()
ans = 0
for x in range(int(w)):
	c = input()
	if '+' in c:
		ans += 1
	else:
		ans -= 1
print(ans)


_No = int(input())
x = 0
i = 0
while i < _No:
	s = str(input())
	if s == 'X++' or s == '++X':
		x += 1
		i += 1
	elif s == 'X--' or s == '--X':
		x -= 1
		i += 1
print(x)


def operation(x):
	y = input()
	if y == 'X++' or y == '++X':
		x += 1
	elif y == 'X--' or y == '--X':
		x -= 1
	return x
n = int(input())
x = 0
for i in range(n):
	x = operation(x)
print(x)


test_case = int(input())
result = 0
for t in range(test_case):
	string = input()
	if string == '++X' or string == 'X++':
		result += 1
	else:
		result -= 1
print(result)


n = int(input())
ctr = 0
for _ in range(n):
	op = input()
	if '+' in op:
		ctr += 1
	else:
		ctr -= 1
print(ctr)


n = int(input())
res = 0
ope = [input() for x in range(n)]
for i in ope:
	if i[1] == '+':
		res += 1
	else:
		res -= 1
print(res)


n = int(input())
list1 = []
count = 0
for i in range(n):
	val = input()
	list1.append(val)
for j in list1:
	if j == '++X' or j == 'X++':
		count += 1
	else:
		count -= 1
print(count)


cycle = int(input())
hah = 0
for i in range(cycle):
	kingsoul = str(input())
	if kingsoul == '++X' or kingsoul == 'X++':
		hah += 1
	else:
		hah -= 1
print(hah)


nstr = input()
n = int(nstr)
x = 0
for i in range(n):
	istr = input()
	if istr == 'X++' or istr == '++X':
		x = x + 1
	else:
		x = x - 1
print(x)


X = 0
for _ in range(int(input().strip(' '))):
	var = input().strip(' ')
	if var[1] == '+':
		X += 1
	elif var[1] == '-':
		X -= 1
print(X)


import math
s = list(map(int, input().split(' ')))[0]
x = 0
for i in range(0, s):
	p = input()
	if len(p.replace('+', '')) < len(p):
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
count = 0
for m in range(n):
	statement = str(input())
	statement = statement.translate({ord(i): None for i in 'xX'})
	if statement == '++':
		count = count + 1
	elif statement == '--':
		count = count - 1
print(count)


from sys import stdin, stdout

def main():
	line = int(stdin.readline())
	i = 0
	x = 0
	while i < line:
		line2 = stdin.readline()
		if line2 == 'X++\n' or line2 == '++X\n':
			x = x + 1
		elif line2 == 'X--\n' or line2 == '--X\n':
			x = x - 1
		i = i + 1
	stdout.write(str(x))
main()


def checkPlusMinus(b):
	count = 0
	b = ''.join(b)
	if '--' in b:
		count -= 1
	elif '++' in b:
		count += 1
	else:
		count += 0
	return count
count = 0
s = input()
for x in range(int(s)):
	b = list(map(str, input()))
	count += checkPlusMinus(b)
print(count)


t = int(input())
x = 0
for tt in range(t):
	s = '++'
	s2 = '--'
	st = str(input())
	if s in st:
		x += 1
	elif s2 in st:
		x -= 1
print(x)


n = int(input())
x = 0
while n:
	k = input()
	if '++' in k:
		x += 1
	elif '--' in k:
		x -= 1
	n -= 1
print(x)


(lambda y: print(sum([1 * ('+' in i) - 1 * ('-' in i) for i in y])))([input() for x in range(int(input()))])


n = int(input())
k = ['++X', '+X+', 'X++']
a = 0
for i in range(n):
	t = str(input())
	if t in k:
		a = a + 1
	else:
		a = a - 1
print(int(a))


numberOfCodes = int(input())
codes = []
for x in range(numberOfCodes):
	codes.append(input())
temp = 0
for x in range(numberOfCodes):
	if codes[x][1] == '+':
		temp += 1
	elif codes[x][1] == '-':
		temp -= 1
print(temp)


x = int(input())
y = []
a = 0
for i in range(x):
	y.append(input())
for i in y:
	for j in i:
		if j == '+':
			a += 1
			break
		if j == '-':
			a -= 1
			break
print(a)


n = int(input())
x = -n
for i in range(n):
	l = input()
	if l.count('+') == 2:
		x += 2
print(x)


n = int(input())
plus_sign = 0
minus_sign = 0
for i in range(n):
	command = input('')
	if command[2] == '+' or command[1] == '+' or command[0] == '+':
		plus_sign = plus_sign + 1
	if command[2] == '-' or command[1] == '-' or command[0] == '-':
		minus_sign = minus_sign + 1
final = minus_sign * -1 + plus_sign
print(final)


r = 0
for i in range(int(input())):
	if '-' in str(list(input().split())):
		r -= 1
	else:
		r += 1
print(r)


n = int(input())
X = 0
emp = ''
for i in range(0, n):
	s = input()
	emp += s
p = emp.count('+') // 2
n = emp.count('-') // 2
print(p - n)


n = int(input())
i = 0
while n > 0:
	n -= 1
	b = [x for x in input()]
	c = '+'
	if c in b:
		i = i + 1
	else:
		i = i - 1
print(str(int(i)))


x = int(input())
answer = 0
a = ''
for i in range(x):
	a = input()
	if a[0] == '+' or a[2] == '+':
		answer += 1
	else:
		answer -= 1
print(answer)


num = int(input())
sum1 = 0
for i in range(num):
	user_input = input()
	if user_input[0] == '+' or user_input[1] == '+':
		sum1 += 1
	else:
		sum1 -= 1
print(sum1)


count = int(input())
num = 0
for i in range(count):
	word = input()
	if word == '++X' or word == 'X++':
		num = num + 1
	if word == '--X' or word == 'X--':
		num = num - 1
print(num)


n = int(input())
str = ''
for i in range(n):
	str += input()
plus = str.count('+') / 2
minus = str.count('-') / 2
print(int(plus - minus))


def bit():
	result = 0
	statements = int(input())
	for i in range(statements):
		operation = input()
		if operation[1] == '+':
			result += 1
		else:
			result -= 1
	return result
print(bit())


n = int(input())
ans = 0
for i in range(n):
	x = input().strip('\n\r')
	if '+' in x:
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
count = 0
for i in range(n):
	temp = str(input())
	if temp.__contains__('++'):
		count += 1
	elif temp.__contains__('-'):
		count -= 1
print(count)


t = int(input())
res = 0
for i in range(t):
	s = str(input())
	if s == 'X++' or s == '++X':
		res = res + 1
	elif s == 'X--' or s == '--X':
		res = res - 1
print(res)


t = int(input())
x = 0

def solution(op):
	if op[0] == 'X':
		if op[1:] == '++':
			return 1
		else:
			return -1
	elif op[:2] == '++':
		return 1
	else:
		return -1
for i in range(t):
	cmd = input()
	x += solution(cmd)
print(x)


def find_new_x(x, statement):
	increments = int(statement.count('+') / 2)
	decrements = int(statement.count('-') / 2)
	if increments > 0:
		x += 1
	elif decrements > 0:
		x -= 1
	return x

def main():
	x = 0
	n = int(input())
	for i in range(n):
		statement = ' '.join(input()).split()
		x = find_new_x(x, statement)
	print(x)
main()


import sys
count_procedure = int(input())
result = 0
for i in range(0, count_procedure):
	string = str(input())
	if string[0] == 'X':
		if string[1] == '+':
			result += 1
		else:
			result -= 1
	if string[0] == '+':
		result += 1
	if string[0] == '-':
		result -= 1
print(result)


n = int(input())
count = 0
for _ in range(n):
	inputStatement = str(input())
	if '+' in inputStatement:
		count = count + 2
print(count - n)


n = int(input())
matrix = []
X = 0
for i in range(n):
	matrix.append(list(map(str, input().strip().split())))
	if matrix[i] == ['++X'] or matrix[i] == ['X++']:
		X += 1
	else:
		X -= 1
print(X)


x = 0
for _ in [0] * int(input()):
	x += [-1, 1]['++' in input()]
print(x)


n = int(input())
if 1 <= n <= 150:
	x = 0
	for i in range(n):
		opartion = input()
		if len(opartion) == 3:
			if opartion[1] == '+':
				x += 1
			else:
				x -= 1
		else:
			print('error')
	print(x)


def main():
	x = 0
	for i in range(int(input())):
		s = input()
		if s[1] == '-':
			x -= 1
		else:
			x += 1
	print(x)
main()


x = int(input())
resultado = 0
for i in range(x):
	text = input()
	if text == 'X++' or text == '++X':
		resultado += 1
	elif text == 'X--' or text == '--X':
		resultado -= 1
print(resultado)


import sys
import collections
import math
import functools
import itertools
import bisect
import operator
import heapq
import random
true = True
false = False
null = None
tcid = 0

def ceil(a, b):
	ans = a // b
	if a % b != 0:
		ans += 1
	return ans

def perr(*args, **kwargs):
	print(*args, file=sys.stderr, **kwargs)

def line():
	ln = sys.stdin.readline().strip()
	if ln == '':
		sys.exit()
	return ln

def lines(n):
	return [line() for i in range(n)]

def split(ln=None):
	return (ln or line()).split()

def parse(*parsers):
	return list(map(lambda p, w: p(w), parsers, split()))

def nums(o=None):
	if o is not None:
		if isinstance(o, int):
			o = lines(o)
		elif isinstance(o, str):
			o = split(o)
	return list(map(int, o or split()))

def num():
	return int(line())

def solve(tcid=1):
	n = num()
	x = 0
	for zz in range(n):
		if line()[1] == '+':
			x += 1
		else:
			x -= 1
	print(x)
while true:
	tcid += 1
	solve(tcid)


inp = int(input())
ini = 0
for i in range(inp):
	ec = input()
	if ec[1] == '+':
		ini += 1
	else:
		ini -= 1
print(ini)


N = int(input())
x = 0
for _ in range(N):
	command = input()
	if '++' in command:
		x += 1
	elif '--' in command:
		x -= 1
print(x)


def solution():
	n = int(input())
	res = 0
	for i in range(n):
		s = input()
		for j in s:
			if j == '+':
				res += 1
				break
			elif j == '-':
				res -= 1
				break
	print(res)
solution()


numOfOperations = int(input())
operations = [str(input()) for i in range(numOfOperations)]
num = 0
for i in range(len(operations)):
	if operations[i] == 'X++' or operations[i] == '++X':
		num += 1
	elif operations[i] == 'X--' or operations[i] == '--X':
		num -= 1
print(num)


t = int(input())
a = []
for i in range(t):
	y = input()
	a.append(y)
tyu = 0
for i in range(t):
	tyu = tyu + a[i].count('++')
print(tyu - (t - tyu))


cases = int(input())
i = 0
x = 0
while i < cases:
	statement = str(input())
	if '+' in statement:
		x += 1
	elif '-' in statement:
		x -= 1
	i += 1
print(x)


def do(a):
	count = 0
	for i in a:
		if '++' in i:
			count += 1
		if '--' in i:
			count -= 1
	return count
n = int(input())
a = []
for i in range(n):
	a.append(input())
print(do(a))


sum = 0
for t in range(int(input())):
	n = input()
	if n in ('X++', '++X'):
		sum += 1
	else:
		sum -= 1
print(sum)


n = int(input())
l1 = []
i = 0
count = 0
while i != n:
	l1.append(str(input()).lower())
	i += 1
for word in l1:
	if word == 'x++':
		count += 1
	elif word == '++x':
		count += 1
	elif word == 'x--':
		count -= 1
	elif word == '--x':
		count -= 1
print(count)


n = int(input())
lis = []
l = 0
for i in range(0, n):
	k = input()
	lis.append(k)
for j in range(0, len(lis)):
	if lis[j] == 'X++' or lis[j] == '++X':
		l = l + 1
	else:
		l = l - 1
print(l)


n = int(input())
S = 0
while n > 0:
	str = input()
	if str[1] == '+':
		S += 1
	else:
		S -= 1
	n -= 1
print(S)


def getInput():
	n = int(input())
	instructions = [input().split() for i in range(n)]
	instructions = [item for sublist in instructions for item in sublist]
	return instructions

def solve(instructions):
	count = 0
	for i in instructions:
		if i in ['X++', '++X']:
			count += 1
		if i in ['X--', '--X']:
			count -= 1
	return count
instructions = getInput()
print(solve(instructions))


ans = 0
for _ in range(int(input())):
	l = input()
	if l[0] == '+' or l[1] == '+':
		ans += 1
	elif l[0] == '-' or l[1] == '-':
		ans -= 1
print(ans)


n = int(input())
i = 1
x = 0
while i <= n:
	l = list(input())
	if '+' in l:
		x += 1
	elif '-' in l:
		x -= 1
	i += 1
print(x)


x = 0
n = int(input())
n2 = 0
while n2 < n:
	n2 = n2 + 1
	sss = input()
	if sss[1] == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


t = int(input())
statement = ''
plus = '+'
minus = '-'
x = 0
for i in range(t):
	statement = input()
	if statement.count(plus) == 2:
		x += 1
	elif statement.count(minus) == 2:
		x -= 1
	else:
		x += 0
print(x)


banyak_input = int(input())
hasil = 0
c = 0
while c < banyak_input:
	ops = input()
	if ops[0] == '+' and ops[1] == '+' or (ops[1] == '+' and ops[2] == '+'):
		hasil = hasil + 1
	if ops[0] == '-' and ops[1] == '-' or (ops[1] == '-' and ops[2] == '-'):
		hasil = hasil - 1
	c = c + 1
print(hasil)


from sys import stdin

def main():
	n = 0
	inp = int(stdin.readline().rstrip())
	for _ in range(inp):
		st = stdin.readline().rstrip()
		if '+' in st:
			n += 1
		else:
			n -= 1
	print(n)
main()


n = int(input())
cnt = 0
for i in range(n):
	sr = input()[1]
	if sr == '+':
		cnt += 1
	if sr == '-':
		cnt -= 1
print(cnt)


n = int(input())
value = 0
for i in range(n):
	statement = input()
	s = sorted(statement)
	if s[0] == '+':
		value = value + 1
	else:
		value = value - 1
print(value)


print(sum((44 - ord(input()[1]) for _ in [0] * int(input()))))


n = int(input())
count = 0
for i in range(0, n, 1):
	count = (count - 1, count + 1)[input()[1] == '+']
print(count, end='')


n = int(input())
a = 0
for i in range(1, n + 1):
	operac = input()
	a1 = operac.count('++')
	a2 = operac.count('--')
	a = a1 - a2 + a
print(a)


import sys
print(sum([1 if '+' in i else -1 for i in sys.stdin.readlines()[1:]]))


def main():
	n = int(input())
	x = 0
	for i in range(0, n):
		st = input()
		if st == '++X' or st == 'X++':
			x += 1
		else:
			x -= 1
	print(x)
main()


n = int(input())
cnt = 0
for i in range(n):
	A = list(input())
	if A.count('+'):
		cnt += 1
	else:
		cnt -= 1
print(cnt)


x = 0
for i in range(int(input())):
	a = str(input())
	if a.find('+') == True or a.rfind('+') == True:
		x += 1
	else:
		x -= 1
print(x)


a = input()
a = int(a)
b = 'X++'
c = '++X'
d = 'X--'
e = '--X'
g = int(0)
for i in range(a):
	x = input()
	if x == b or x == c:
		g = g + 1
	if x == d or x == e:
		g = g - 1
print(g)


n = int(input())
lis = []
for i in range(n):
	lis.append(input())
x = 0
for i in range(n):
	if lis[i] in ['++X', 'X++']:
		x += 1
	else:
		x -= 1
print(x)


import sys
n = int(input())
i = 0
j = 0
x = 0
k = 0
a = []
while i < n:
	a.append(str(i))
	i += 1
while j < n:
	a[j] = input()
	j += 1
while k < n:
	if a[k] == '++X' or a[k] == 'X++':
		x += 1
	if a[k] == '--X' or a[k] == 'X--':
		x -= 1
	k += 1
print(x)


import sys
input = sys.stdin.readline
n = int(input())
x = 0
for i in range(n):
	myStr = input().strip()
	if myStr.lower() == '++x' or myStr.lower() == 'x++':
		x += 1
	elif myStr.lower() == '--x' or myStr.lower() == 'x--':
		x -= 1
print(x)


def operate():
	x = 0
	n = int(input())
	if n < 1 or n > 150:
		return
	for i in range(n):
		operation = input()
		if operation == 'X++' or operation == '++X':
			x += 1
		elif operation == 'X--' or operation == '--X':
			x -= 1
		else:
			return
	print(x)
operate()


i = int(input())
x = 0
store = []
l = 0
while True:
	l = l + 1
	a = input()
	store.append(a)
	if a[1] == '+':
		x += 1
	if a[1] == '-':
		x -= 1
	if l == int(i):
		break
print(x)


a = int(input())
x = 0
for i in range(a):
	valor = input().replace('++', 'p')
	valor = valor.replace('--', 'm')
	for j in valor:
		if j == 'm':
			x = x - 1
		if j == 'p':
			x = x + 1
print(x)


cases = int(input())
var = 0
while cases:
	state = input()
	if '--' in state:
		var -= 1
	if '++' in state:
		var += 1
	cases -= 1
print(var)


answer = 0
tcs = input()
tcs = int(tcs)
breaker = 0
while breaker != tcs:
	tcs += 1
	try:
		read_item = input()
	except:
		break
	if '--' in read_item:
		answer -= 1
	if '++' in read_item:
		answer += 1
print(answer)


X = 0
n = int(input())
for i in range(n):
	text = input()
	if text[0] + text[1] == '++' or text[-1] + text[-2] == '++':
		X = X + 1
	elif text[0] + text[1] == '--' or text[-1] + text[-2] == '--':
		X = X - 1
print(X)


a = int(input())
ans = 0
for i in range(a):
	p = input()
	if p[0] == '+' or p[-1] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
x = 0
for i in range(n):
	oper = input().split()
	if '--X' in oper or 'X--' in oper:
		x -= 1
	else:
		x += 1
print(x)


n = int(input())
x = 0
for i in range(n):
	a = input()
	a = list(a)
	for l in range(len(a)):
		if l != len(a) - 1:
			if a[l] == '+' and a[l + 1] == '+':
				x = x + 1
			if a[l] == '-' and a[l + 1] == '-':
				x = x - 1
print(x)


string = ''
for i in range(int(input())):
	string += input()
print(string.count('+') // 2 - string.count('-') // 2)


import sys
import math
import collections
from collections import deque
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))
n = int(stdin.readline().strip('\n'))
x = 0
for i in range(n):
	s = str(stdin.readline().strip('\n'))
	if '++' in s:
		x += 1
	if '--' in s:
		x -= 1
print(x)


def inc(string, x):
	slist = list(string.lower())
	for i in range(2):
		if slist[i] == 'x':
			del slist[i]
		else:
			what = slist[i]
			break
	if what == '-':
		x = x - 1
	else:
		x = x + 1
	return x
x = int(0)
a = int(input())
for i in range(a):
	string = str(input())
	x = inc(string, x)
print(x)


stroki = int(input())
x = 0
e = 0
while e != stroki:
	d = input()
	if '+' in d:
		x += 1
	else:
		x -= 1
	e += 1
print(x)


time = int(input())
b = 0
for i in range(time):
	q = input()
	if q in ['++X', 'X++']:
		b += 1
	else:
		b -= 1
print(b)


n = int(input())
operat = []
result = 0
for i in range(n):
	operat.append(str(input()))
for i in operat:
	if i.count('+') > 0:
		result += 1
	else:
		result -= 1
print(result)


n = int(input())
x = 0
for each in range(n):
	p = input()
	if p[0] == '+' or p[-1] == '+':
		x += 1
	else:
		x -= 1
print(x)


x = 0
num_of_commands = int(input().strip())
for _ in range(num_of_commands):
	command = input().strip()
	if '+' in command:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
count = 0
while n > 0:
	m = input()
	if m[1] == '+':
		count += 1
	else:
		count -= 1
	n -= 1
print(count)


sum = 0
n = int(input())
while n > 0:
	c = list(str(input()))
	if c[1] == '+':
		sum += 1
	else:
		sum -= 1
	n = n - 1
print(sum)


x = 0
t = int(input())
for f in range(0, t):
	string = str(input())
	if string == '++X' or string == '++x' or string == 'X++' or (string == 'x++') or (string == '+X+') or (string == '+x+'):
		x += 1
	elif string == '--X' or string == '--x' or string == 'X--' or (string == 'x--') or (string == '-X-') or (string == '-x-'):
		x -= 1
print(x)


t = int(input())
i = 0
plus = 0
minus = 0
while i < t:
	n = input()
	if '++' in n:
		plus = plus + 1
	elif '--' in n:
		minus = minus + 1
	i = i + 1
print(plus - minus)


y = input('')
z = 0
i = 0
while i < int(y):
	i += 1
	x = input(' ')
	if x == 'X++':
		z += 1
	elif x == '++X':
		z += 1
	elif x == 'X--':
		z -= 1
	elif x == '--X':
		z -= 1
print(z)


n = int(input())
res = 0
while n:
	st = input()
	if '+' in st:
		res += 1
	else:
		res -= 1
	n -= 1
print(res)


instances = int(input())
value = 0
for i in range(instances):
	value = value + 1 if '+' in input() else value - 1
print(value)


def check(s):
	x = True
	for i in range(len(s)):
		if s[i] == '-':
			x = False
			break
	return x
n = int(input())
count = 0
for i in range(n):
	s = input()
	if check(s):
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
x = nu = 0
while nu < n:
	nu += 1
	ji = set(input())
	if '+' in ji:
		x += 1
	else:
		x -= 1
print(x)


import os
import sys
n = int(input())
m = []
c = 0
for i in range(n):
	m.append(str(input()))
for i in range(n):
	if m[i] == '++X':
		c = c + 1
	elif m[i] == 'X++':
		c = c + 1
	elif m[i] == '--X':
		c = c - 1
	elif m[i] == 'X--':
		c = c - 1
print(c)


num = int(input())
lst = []
count = 0
for i in range(num):
	lst.append(input())
for i in lst:
	if '+' in i:
		count += 1
	else:
		count -= 1
print(count)


def bit(arr):
	ele = ''
	cnt = 0
	for a in range(len(arr)):
		ele = arr[a]
		if ele[1] == '+':
			cnt += 1
		if ele[1] == '-':
			cnt -= 1
	print(cnt)
arr = []
n = int(input())
for i in range(n):
	arr.append(input())
bit(arr)


def bit(n):
	y = 0
	for i in range(n):
		x = input()
		if '++' in x:
			y += 1
		if '--' in x:
			y -= 1
	return y
n = int(input())
print(bit(n))


n = int(input())
x = 0
for _ in range(n):
	s = input()
	op = list(s[:len(s) - 1])
	if op[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


lines = int(input())
final = 0
for x in range(lines):
	inp = input()
	if '+' in inp:
		final += 1
	else:
		final -= 1
print(final)


n = eval(input())
s = []
for i in range(n):
	s.append(input())
x = 0
for i in range(n):
	if s[i] == 'X++' or s[i] == '++X':
		x += 1
	elif s[i] == '--X' or s[i] == 'X--':
		x -= 1
print(x)


n = int(input())
ret = 0
while n:
	s = input()
	ret = ret + 1 if '+' in s else ret - 1
	n -= 1
print(ret)


n = int(input())
op = [0, 0]
for i in range(n):
	s = input()
	op[0] += s.count('++')
	op[1] += s.count('--')
print(op[0] - op[1])


N = int(input())
x = 0
for i in range(N):
	A = input()
	if A[0] == '+' or A[1] == '+' or A[2] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = eval(input())
l = []
i = 1
while i <= n:
	l = l + [input()]
	i += 1
c = 0
i = 0
while i <= len(l) - 1:
	if l[i] == 'X++' or l[i] == '++X' or l[i] == 'x++' or (l[i] == '++x'):
		c += 1
	elif l[i] == 'X--' or l[i] == '--X' or l[i] == 'x--' or (l[i] == '--x'):
		c -= 1
	i += 1
print(c)


n = int(input())
m = 0
main = []
while m < n:
	l = input()
	main.append(l)
	m += 1
x = 0
for i in main:
	if i == 'X++' or i == '++X':
		x += 1
	elif i == 'X--' or i == '--X':
		x -= 1
print(x)


n = int(input())
t = 0
l = []
while t < n:
	l.append(input())
	t += 1
x = l.count('++X')
y = l.count('--X')
a = l.count('X++')
b = l.count('X--')
print(x - y + a - b)


no = int(input())
x = 0
for i in range(no):
	statement = str(input())
	if '++' in statement:
		x += 1
	else:
		x -= 1
print(x)


number = int(input())
sum = 0
for i in range(number):
	case = input()
	if case[1] == '+':
		sum += 1
	else:
		sum -= 1
print(sum)


k = 0
for _ in range(int(input())):
	s = input()
	if s[0] == 'X':
		if s[1] == '+':
			k = k + 1
		else:
			k = k - 1
	elif s[0] == '+':
		k = k + 1
	else:
		k = k - 1
print(k)


n = int(input())
nl = []
x = 0
for i in range(n):
	nl.append(input())
for index in range(n):
	if nl[index] == 'x++' or nl[index] == '++x' or nl[index] == 'X++' or (nl[index] == '++X'):
		x += 1
	else:
		x -= 1
print(x)


n1 = int(input())
n = 1
x = 0
for i in range(n1):
	w = input()
	if w == 'X++' or w == '++X':
		x += n
	else:
		x -= n
print(x)


i = int(input())
l = list()
count = 0
for i in range(0, i):
	a = str(input())
	b = a.find('++')
	c = a.find('--')
	if b != -1:
		count = count + 1
	if c != -1:
		count = count - 1
print(count)


n = int(input())
x = 0
for i in range(n):
	l = list(input())
	if l[0] == 'X' or l[2] == 'X':
		if l[1] == '+':
			x += 1
		else:
			x -= 1
print(x)


no_op = int(input())
x = 0
for n in range(no_op):
	op = str(input())
	if op.count('--') > 0:
		x = x - 1
	if op.count('++') > 0:
		x = x + 1
print(x)


x = 0
n = int(input())
while n > 0:
	n -= 1
	s = input()
	if s[0] == '+':
		x += 1
	elif s[0] == '-':
		x -= 1
	elif s[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


num = int(input())
x = 0
for i in range(num):
	cal = input()
	if cal[0] == '+' or cal[1] == '+' or cal[2] == '+':
		x += 1
	else:
		x -= 1
print(x)


def fuhao(a):
	if '+' in a:
		return '+'
	if '-' in a:
		return '-'
n = int(input())
x = 0
while n > 0:
	a = input()
	if fuhao(a) == '+':
		x += 1
	if fuhao(a) == '-':
		x -= 1
	n -= 1
print(x)


n = int(input())
bits = []
for i in range(n):
	bits.append(str(input()))
x = 0
for i in bits:
	if i == 'X++' or i == '++X':
		x += 1
	elif i == 'X--' or i == '--X':
		x -= 1
	else:
		x += 0
print(x)


n = int(input())
x = 0
m = ['++X', 'X++']
for i in range(n):
	line = input()
	if line in m:
		x += 1
	else:
		x = x - 1
print(x)


cin_n = int(input())
final = 0
for i in range(0, cin_n):
	cin_str = input()
	if '-' in cin_str:
		final -= 1
	else:
		final += 1
print(final)


n = int(input())
ans = 0
for i in range(n):
	op = sorted(list(input()))
	if op[0] == '-':
		ans -= 1
	else:
		ans += 1
print(ans)


n = int(input())
count = 0
for x in range(n):
	str = input()
	p = str.count('++')
	m = str.count('--')
	count = count + p - m
print(count)


limit = int(input())
x = 0
for i in range(limit):
	inst = input()
	if inst == '++X':
		x += 1
	if inst == 'X++':
		x += 1
	if inst == '--X':
		x -= 1
	if inst == 'X--':
		x -= 1
print(x)


N = int(input())
x = 0
for i in range(N):
	A = input()
	if '++' in A:
		x += 1
	elif '--' in A:
		x -= 1
print(x)


n = int(input())
x = 0
for i in range(n):
	operator = input()
	countp = operator.count('++')
	countm = operator.count('--')
	if countp == 1:
		x += 1
	elif countm == 1:
		x -= 1
print(x)


def Bit(x):
	if x == 'X++' or x == '++X':
		return 1
	else:
		return -1
x = 0
for i in range(int(input())):
	x += Bit(input())
print(x)


def main():
	n = int(input())
	x = 0
	for i in range(n):
		rdl = input()
		if rdl[0] == 'X':
			if rdl[1] == '+':
				x += 1
			else:
				x -= 1
		elif rdl[0] == '+':
			x += 1
		else:
			x -= 1
	print(x)
main()


X = 0
n = int(input(''))
for i in range(n):
	operator = list(input(''))
	if operator[1] == '+':
		X += 1
	else:
		X -= 1
print(X)


sum = 0
for _ in range(int(input())):
	p = input()
	if p == '++X' or p == 'X++':
		sum += 1
	elif p == '--X' or p == 'X--':
		sum -= 1
print(sum)


n = int(input())
count = 0
while n > 0:
	s = input()
	l = len(s)
	if s[0] == '+' or s[2] == '+':
		count += 1
	if s[0] == '-' or s[2] == '-':
		count -= 1
	n -= 1
print(count)


def exec_statement(x, string):
	if string.find('+') >= 0:
		x += 1
	elif string.find('-') >= 0:
		x -= 1
	return x
x = 0
n = int(input())
for _ in range(n):
	statement = input()
	x = exec_statement(x, statement)
print(x)


n = int(input())
count = 0
while n:
	s = input()
	count += [-1, 1]['+' in s]
	n -= 1
print(count)


num = int(input())
s = []
x = 0
for i in range(num):
	s.append(input())
for i in s:
	if i == '++X' or i == 'X++':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for i in range(n):
	a = input()
	if '--' in a:
		x -= 1
	elif '++' in a:
		x += 1
	else:
		pass
print(x)


integer = int
string = str
length = len

def main():
	n = integer(input())
	x = 0
	for i in range(n):
		s = input()
		if '+' in s:
			x += 1
		else:
			x -= 1
	print(x)
main()


from sys import stdin, stdout

def main():
	n = int(stdin.readline().rstrip())
	statements = []
	for num in range(0, n):
		statements.append(str(stdin.readline().rstrip().split()))
	value = 0
	for statement in statements:
		if '+' in statement:
			value += 1
		else:
			value -= 1
	stdout.write(str(value) + '\n')
main()


from sys import stdin, stdout

def parser(string):
	for i in string:
		if i == '+':
			return 1
		if i == '-':
			return -1
n = int(stdin.readline())
count = 0
for _ in range(n):
	operator = stdin.readline().strip()
	count += parser(operator)
stdout.write(f'{count}\n')


n = int(input())
l = []
o = 0
for i in range(n):
	l.append(input())
for j in range(n):
	if '++' in l[j]:
		o += 1
	elif '--' in l[j]:
		o -= 1
print(o)


n = int(input())
answer = 0
for _ in range(n):
	a = input()
	if '++' in a:
		answer += 1
	else:
		answer -= 1
print(answer)


a = int(input())
count = 0
for x in range(a):
	i = str(input())
	if '++' in i:
		count += 1
	elif '--' in i:
		count -= 1
print(count)


def check(s):
	p = s.count('+')
	m = s.count('-')
	x = s.count('X')
	if p + m + x == len(s):
		return True
	return False
n = int(input())
ans = 0
for i in range(n):
	sym = input()
	if check(sym):
		if sym == '++X' or sym == 'X++':
			ans += 1
		else:
			ans -= 1
print(ans)


def sol(n):
	x = 0
	for statement in range(n):
		exp = input()
		if exp.find('++') != -1:
			x += 1
		else:
			x -= 1
	return x
n = int(input())
print(sol(n))


x = 0
count = int(input())
for i in range(count):
	taskStr = input()
	taskList = []
	for i in taskStr:
		taskList.append(i)
	if taskList[0] == '+' and taskList[1] == '+' or (taskList[1] == '+' and taskList[2] == '+'):
		x += 1
	if taskList[0] == '-' and taskList[1] == '-' or (taskList[1] == '-' and taskList[2] == '-'):
		x -= 1
print(x)


times = input()
result = 0
for number in range(int(times)):
	statement = input('')
	if '++' in statement:
		result += 1
	elif '--' in statement:
		result -= 1
print(result)


from sys import stdin

def main():
	casos = int(stdin.readline().strip())
	x = 0
	for i in range(0, casos):
		o = stdin.readline().strip()
		if '+' in o:
			x += 1
		else:
			x -= 1
	print(x)
main()


t = int(input())
r = 0
for i in range(t):
	s = input()
	if s.find('++') != -1:
		r += 1
	elif s.find('--') != -1:
		r -= 1
print(r)


import math
import os
import random
import re
import sys
INCREMENT_OPS = ['++X', 'X++']
DECREMENT_OPS = ['--X', 'X--']

def solve():
	n = int(input())
	initial = 0
	for _ in range(n):
		operation = str(input())
		if operation in INCREMENT_OPS:
			initial += 1
		if operation in DECREMENT_OPS:
			initial -= 1
	return initial
result = solve()
print(result)


def function(l):
	total = 0
	for i in l:
		if '+' in i:
			total += 1
		else:
			total -= 1
	print(total)
n1 = input()
n = int(n1)
l = []
for i in range(n):
	s = input()
	l.append(s)
function(l)


n = int(input())
s = [input() for i in range(n)]
v = ''
for i in s:
	v += i
ans = v.count('+') // 2 - v.count('-') // 2
print(ans)


import re
x = 0
for _ in range(int(input())):
	i = input()
	a = re.findall('\\+\\+', i)
	s = re.findall('--', i)
	for _ in a:
		x += 1
	for _ in s:
		x -= 1
print(x)


from sys import stdin
n = int(stdin.readline().strip())
x = 0
for index in range(n):
	operation = stdin.readline().strip()
	the_operation = operation.replace('X', '')
	if the_operation == '++':
		x += 1
	else:
		x -= 1
print(x)


x = 0
k = int(input())
i = 0
while i < k:
	s = input()
	if s == 'X++':
		x = x + 1
	elif s == '++X':
		x = x + 1
	elif s == 'X--':
		x = x - 1
	elif s == '--X':
		x = x - 1
	else:
		x = x
	i = i + 1
print(x)


a = 0
for _ in range(int(input())):
	s = input()
	if s == 'X++' or s == '++X':
		a += 1
	elif s == '--X' or s == 'X--':
		a -= 1
print(a)


n = int(input())
statements = [input() for _ in range(n)]
x = 0
for i in range(n):
	if '++' in statements[i].split('X'):
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
print(2 * sum((input()[1] == '+' for x in range(n))) - n)


finalValue = 0
mainList = []
numOfStatements = int(input())
for i in range(numOfStatements):
	aList = list(input())
	mainList.append(aList)
for i in range(numOfStatements):
	if '+' in mainList[i]:
		finalValue += 1
	elif '-' in mainList[i]:
		finalValue -= 1
print(finalValue)


n = int(input())
c = 0
for _ in range(n):
	m = str(input())
	if m == '++X' or m == 'X++':
		c = c + 1
	if m == '--X' or m == 'X--':
		c = c - 1
print(c)


x = int(input())
s = 0
for i in range(x):
	y = input()
	s = s + 2 * ('+' in y) - 1
print(s)


n = int(input())
c = 0
for i in range(n):
	enter = input()
	first_char = enter[0]
	if first_char in '+-':
		sym = first_char
		if sym == '+':
			c += 1
		else:
			c -= 1
	elif first_char == 'X':
		second_char = enter[1]
		sym = second_char
		if sym == '+':
			c += 1
		else:
			c -= 1
print(c)


t = int(input())
x = 0
for y_qtr in range(t):
	n = input()
	for i in n:
		if i == '+':
			x = x + 1
			break
		elif i == '-':
			x = x - 1
			break
print(x)


N = int(input())
X = 0
for n in range(N):
	if input().replace('X', '') == '--':
		X -= 1
	else:
		X += 1
print(X)


from sys import stdin

def main():
	inp = stdin
	cases = int(inp.readline().strip())
	total = 0
	for i in range(0, cases):
		operation = inp.readline().strip()
		if '++' in operation:
			total = total + 1
		else:
			total = total - 1
	print(total)
main()


n = int(input())
x = 0
for i in range(n):
	t = input()
	if t in ['++X', 'X++']:
		x += 1
	elif t in ['X--', '--X']:
		x -= 1
	else:
		continue
print(x)


n = int(input())
xString = []
for i in range(n):
	xString.append(input().lower())
xValue = 0
for i in range(n):
	if xString[i] == 'x++' or xString[i] == '++x':
		xValue += 1
	else:
		xValue -= 1
print(xValue)


def getresult(n):
	x = 0
	for i in n:
		if '++' in i:
			x += 1
		else:
			x -= 1
	return x
amt = int(input())
arr = []
for _ in range(amt):
	arr.append(input().rstrip())
print(getresult(arr))


R = lambda : map(int, input().split())
(n, res) = (int(input()), 0)
for _ in range(n):
	res += 1 if '+' in input() else -1
print(res)


n = int(input())
som = 0
for i in range(n):
	stat = input()
	if '-' in stat:
		som -= 1
	else:
		som += 1
print(som)


n = int(input())
bit = []
x = 0
for i in range(n):
	bit.append(input())
for j in range(n):
	if bit[j] in {'++X', 'X++'}:
		x += 1
	elif bit[j] in {'--X', 'X--'}:
		x -= 1
print(x)


def bit():
	x = 0
	n = int(input())
	l1 = [input() for _ in range(n)]
	for i in l1:
		if i in ['x++', '++x', 'X++', '++X']:
			x += 1
		elif i in ['--x', 'x--', 'X--', '--X']:
			x -= 1
		else:
			continue
	return x
print(bit())


list2 = []
many2 = int(input())
total = 0
for much in range(many2):
	list2.append(input())
for x in list2:
	if x == 'X++' or x == '++X':
		total += 1
	if x == 'X--' or x == '--X':
		total -= 1
print(total)


x = int(input())
v1 = 0
v2 = 0
for i in range(x):
	y = input().lower()
	if y == 'x++' or y == '++x':
		v1 += 1
	elif y == 'x--' or y == '--x':
		v2 += 1
print(v1 - v2)


print(sum((eval(input().replace('X', '+ 0').replace('++', '+ 1 ').replace('--', '- 1')) for x in [0] * int(input()))))


x = 0
s1 = '++'
s2 = '--'
for i in range(int(input())):
	s = input()
	if s1 in s:
		x = x + 1
	if s2 in s:
		x = x - 1
print(x)


dick = int(input())
a = 0
x = 0
while a < dick:
	croc = input()
	if croc == '++X' or croc == 'X++':
		x += 1
	else:
		x -= 1
	a += 1
print(x)


from sys import stdin
res = 0
stmt = stdin.readlines()[1:]
for st in stmt:
	strr = st.strip()
	if strr == 'X++' or strr == '++X':
		res += 1
	else:
		res -= 1
print(res)


n = eval(input())
i = 0
a = 0
while i < n:
	m = input()
	if m[0] == '+' or m[len(m) - 1] == '+':
		a += 1
	else:
		a -= 1
	i += 1
print(a)


x = 0
numOperations = int(input())
for _ in range(numOperations):
	operation = input()
	if operation == 'X++' or operation == '++X':
		x += 1
	elif operation == 'X--' or operation == '--X':
		x -= 1
print(x)


a = '++x'
b = '--x'
x = 0
n = int(input())
for i in range(n):
	y = 0
	m = input()
	for p in m:
		if p in a:
			y += 1
	if y > 1:
		x += 1
	else:
		x -= 1
print(x)


def mm(q, a):
	if '++' in q:
		a = a + 1
	else:
		a = a - 1
	return a
n = input()
n = int(n)
a = 0
for i in range(n):
	p = input()
	c = mm(p, a)
	a = c
print(c)


cnt = int(input())
i = 0
for _ in range(cnt):
	string = input()
	if '+' in string:
		i += 1
	else:
		i -= 1
print(i)


x = 0
roun = int(input())
for i in range(roun):
	bit = input()
	if bit == '++X' or bit == 'X++':
		x += 1
	if bit == '--X' or bit == 'X--':
		x -= 1
print(x)


a = int(input())
x = 0
for j in range(a):
	c = input()
	i = 0
	while i < len(c):
		if c[i] == '+':
			x += 1
			i += 1
		elif c[i] == '-':
			x -= 1
			i += 1
		i += 1
print(x)


a = int(input())
shet = 0
sum = 0
pls = 0
min = 0
for i in range(a):
	b = input()
	for i in range(int(len(b))):
		if b[i] == '-':
			min += 1
		if b[i] == '+':
			shet += 1
			pls += 1
		if b[i] == 'X':
			sum += 0
print(pls // 2 - min // 2)


from sys import stdin

def solve(vec):
	ans = 0
	lista = []
	for i in range(len(vec)):
		if '+' in vec[i]:
			ans += 1
		else:
			ans -= 1
	return ans

def main():
	vec = []
	line = int(stdin.readline().strip())
	for i in range(line):
		v = stdin.readline().strip()
		vec.append(v)
	print(solve(vec))
main()


import sys
input = sys.stdin.readline

def int_array():
	return list(map(int, input().split()))
count = 0
for i in range(int(input())):
	a = input()
	if '++' in a:
		count += 1
	if '--' in a:
		count -= 1
print(count)


n = int(input())
t = 0
for i in range(0, n):
	s = input()
	if s.find('++') == 0 or s.find('++') == 1:
		t += 1
	if s.find('--') == 0 or s.find('--') == 1:
		t -= 1
print(t)


nn = int(input())
count = 0
for i in range(nn):
	aa = input()
	if 'X++' in aa or '++X' in aa:
		count = count + 1
	if '--X' in aa or 'X--' in aa:
		count = count - 1
print(count)


from sys import stdin
n = int(input())

def main(n, strm):
	x = 0
	for i in range(n):
		if '+' in strm.readline():
			x += 1
		else:
			x -= 1
	return x
print(main(n, stdin))


n = int(input())
x = 0
for j in range(n):
	code = str(input())
	if '+' in code:
		x += 1
	elif '-' in code:
		x -= 1
print(x)


n = int(input(''))
c = 0
l = []
for i in range(n):
	s = str(input(''))
	I = s.split('X')
	for items in I:
		if items != '':
			if items == '++':
				c = c + 1
			elif items == '--':
				c = c - 1
print(c, end='')


n = int(input())
count = 0
if n >= 1 and n <= 150:
	for i in range(n):
		a = str(input())
		if a == 'X++' or a == '++X':
			count += 1
		elif a == 'X--' or a == '--X':
			count -= 1
	print(count)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])
number = inp()
x = 0
while number > 0:
	stmt = insr()
	if stmt[0] == 'X':
		if stmt[1] == '-':
			x = x - 1
		else:
			x = x + 1
	elif stmt[0] == '-':
		x = x - 1
	else:
		x = x + 1
	number = number - 1
print(x)


n = int(input())
x = []
X = 0
for i in range(n):
	w = input()
	x.append(w)
for i in x:
	if i == '++X' or i == 'X++':
		X = X + 1
	elif i == '--X' or i == 'X--':
		X = X - 1
print(X)


result = 0
for i in range(int(input())):
	s = ''.join(sorted(set(input())))
	if s == '+X':
		result += 1
	else:
		result -= 1
print(result)


numberOfStatements = int(input())
x = 0
for statementNumber in range(0, numberOfStatements):
	statement = input()
	if '++' in statement:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for _ in range(n):
	command = input().replace('X', '')
	if command == '++':
		x += 1
	if command == '--':
		x -= 1
print(x)


n = int(input(''))
(i, total) = (0, 0)
while i < n:
	data = input('')
	if data == '++X' or data == 'X++':
		total += 1
	elif data == '--X' or data == 'X--':
		total -= 1
	i += 1
print(total)


n = input()
ergebnis = 0
for _ in range(int(n)):
	rechnung = input()
	if '+' in rechnung:
		ergebnis += 1
	else:
		ergebnis -= 1
print(ergebnis)


s = 0
ls = []
n = int(input())
for i in range(1, n + 1):
	ls.append(input())
for i in range(len(ls)):
	if ls[i] == 'X++':
		s += 1
	elif ls[i] == 'X--':
		s -= 1
	elif ls[i] == '--X':
		s -= 1
	elif ls[i] == '++X':
		s += 1
print(s)


n = int(input())
value = 0
for i in range(n):
	command = input()
	if command.find('++') != -1:
		value += 1
	else:
		value -= 1
print(value)


n = int(input())
b = 0
for i in range(0, n):
	y = input()
	c = '++'
	d = '--'
	if c == y[0:2] or c == y[1:]:
		b += 1
	else:
		b -= 1
print(b)


import math
scanner = lambda : map(int, input().split())
n = int(input())
x = 0
op = ''
for i in range(n):
	op = input()
	if '++' in op:
		x += 1
	elif '--' in op:
		x -= 1
print(x)


N = int(input())
x = 0
for i in range(N):
	s = input()
	if s[-1:-3:-1] == '++' or s[:2] == '++':
		x += 1
	elif s[-1:-3:-1] == '--' or s[:2] == '--':
		x -= 1
print(x)


x = input()
count = 0
while int(x) > 0:
	z = input()
	if str(z) == 'X++' or str(z) == '++X':
		count += 1
	else:
		count -= 1
	x = int(x) - 1
print(count)


count = int(input())
counter = 0
x = 0
while counter < count:
	operation = input()
	if '++' in operation:
		x += 1
	if '--' in operation:
		x -= 1
	counter += 1
print(x)


inp = int(input())
number = 0
for x in range(inp):
	inp = input()
	if inp == '++X':
		number += 1
	elif inp == 'X++':
		number += 1
	elif inp == '--X':
		number -= 1
	elif inp == 'X--':
		number -= 1
print(number)


import sys
n = int(input())
x = 0
for i in range(n):
	a = input()
	if a == '++X' or a == 'X++':
		x = x + 1
	else:
		x = x - 1
print(x)


x = 0
n = int(input())
statements = [input() for i in range(n)]
for state in statements:
	if '+' in state:
		x += 1
	elif '-' in state:
		x -= 1
print(x)


statements = int(input())
tally = 0
for i in range(0, statements):
	x = str(input())
	if x.find('--') == -1:
		tally += 1
	else:
		tally -= 1
print(tally)


n = int(input())

def solve(n):
	total = 0
	for x in range(0, n):
		statement = str(input())
		if statement == '++X' or statement == 'X++':
			total += 1
		elif statement == '--X' or statement == 'X--':
			total -= 1
	return total
print(solve(n))


from sys import stdin
print(sum((stdin.readline().count('+') - 1 for _ in range(int(stdin.readline())))))


x = 0
statements = []
n = int(input())
for i in range(n):
	statements.append(input())
for i in statements:
	if '+' in i:
		x += 1
	elif '-' in i:
		x -= 1
	else:
		continue
print(x)


n = int(input())
x = 0
for i in range(n):
	k = input()
	if k == 'X++' or k == '++X' or k == '+X+':
		x = x + 1
		continue
	elif k == '--X' or k == 'X--' or k == '-X-':
		x = x - 1
		continue
print(x)


a = int(input())
x = 0
while 1 <= a <= 150:
	b = input().lower()
	if b == '++x' or b == 'x++':
		x = x + 1
	elif b == '--x' or b == 'x--':
		x = x - 1
	a = a - 1
print(x)


def main():
	res = 0
	num_of_lines = int(input())
	for i in range(0, num_of_lines):
		tmp = str(input())
		if '+' in tmp:
			res = res + 1
		if '-' in tmp:
			res = res - 1
	print(res)
main()


n = int(input())
x = 0
for i in range(n):
	if '+' in input():
		x += 1
	else:
		x -= 1
print('{:d}'.format(x))


t = int(input())
i = 0
val = 0
while i < t:
	a = input()
	if '+' in a:
		val = val + 1
	elif '-' in a:
		val = val - 1
	i = i + 1
print(val)


def main():
	n = int(input())
	result = 0
	for i in range(n):
		if '+' in input():
			result += 1
		else:
			result -= 1
	return result

def ints_from_input():
	return (int(i) for i in input().split())
print(main())


x = 0
for _ in [0] * int(input()):
	state = input()
	if ord(state[1]) == 43:
		x = x + 1
	else:
		x = x - 1
print(x)


n = int(input())
v = 0
for i in range(n):
	o = list(input())
	if '+' in o:
		v += 1
	else:
		v -= 1
print(v)


a = 0
for i in range(int(input())):
	b = list(input())
	b.sort()
	if b[0] == '-':
		a -= 1
	else:
		a += 1
print(a)


n = int(input())
cnt = 0
while n:
	t = input()
	if t[1] == '+':
		cnt = cnt + 1
	else:
		cnt = cnt - 1
	n = n - 1
print(cnt)


num = int(input())
operations = []
value = 0
for i in range(num):
	expression = input('')
	operations.append(expression)
for j in operations:
	if j == '++X' or j == 'X++' or j == '+X+':
		value += 1
	elif j == '--X' or j == 'X--' or j == '-X-':
		value -= 1
print(value)


n = int(input())
x = 0
while n > 0:
	n = n - 1
	op = input()
	if op[1] == '+':
		x = x + 1
	else:
		x = x - 1
print(x)


def bit(statement):
	result = 0
	if statement[0] == 'X' or statement[2] == 'X':
		if statement[1] == '+' and statement[2] == '+' or (statement[0] == '+' and statement[1] == '+'):
			result = result + 1
		if statement[1] == '-' and statement[2] == '-' or (statement[0] == '-' and statement[1] == '-'):
			result = result - 1
	return result
n = input()
x = 0
for i in range(0, int(n)):
	statement = input()
	x = x + bit(statement)
print(x)


n = int(input())
otv = 0
i = 0
while i < n:
	s = input()
	if s[1] == '+':
		otv += 1
	else:
		otv -= 1
	i += 1
print(otv)


tc = input(' ')
num = int(tc)
X = 0
while num > 0:
	op = input('  ')
	if op == '++X' or op == 'X++':
		X = X + 1
	elif op == '--X' or op == 'X--':
		X = X - 1
	num = num - 1
print(X)


n = int(input())
x = 0
for m in range(0, n):
	list1 = list(input())
	if '+' in list1:
		x += 1
	else:
		x -= 1
print(x)


print(eval('+'.join([['-1', '1']['+' in input()] for _ in [0] * int(input())])))


n = int(input())
l = []
for i in range(0, n):
	a = input()
	l.append(a)
s = 0
k = 0
for i in range(0, n):
	if '+' in l[i]:
		s = s + 1
	if '-' in l[i]:
		k = k + 1
w = s - k
print(w)


def main():
	count = 0
	for i in range(int(input())):
		if '++' in input():
			count += 1
		else:
			count -= 1
	print(count)
main()


t = 0
for i in range(0, int(input())):
	x = str(input())
	if x[0] == '+' or x[1] == '+':
		t += 1
	elif x[0] == '-' or x[1] == '-':
		t -= 1
print(t)


n = int(input())
result = 0
for i in range(n):
	ht = dict()
	a = input()
	for i in a:
		if i not in ht:
			ht[i] = 1
		else:
			ht[i] += 1
	for (k, v) in ht.items():
		if k == '+' and v == 2:
			result += 1
		elif k == '-' and v == 2:
			result -= 1
print(result)


op_count = int(input())
increment = ['X++', '++X', 'x++', '++x']
decrement = ['X--', '--X', 'x--', '--x']
operation_list = []
for i in range(op_count):
	operation_list.append(input())
flag = 0
for operation in operation_list:
	if operation in increment:
		flag += 1
	elif operation in decrement:
		flag -= 1
print(flag)


def val_x(arr):
	x = 0
	for op in arr:
		if '--' in op:
			x -= 1
		else:
			x += 1
	return x
n = int(input())
arr = []
for i in range(0, n):
	s = input()
	arr.append(s)
print(val_x(arr))


v = 0
p = '++'
m = '--'
for i in [0] * int(input()):
	n = input()
	if '++' in n:
		v += 1
	elif '--' in n:
		v -= 1
print(v)


cont = 0
N = int(input(''))
for k in range(N):
	t = input('')
	if '++' in t:
		cont += 1
	else:
		cont -= 1
print(cont)


n = int(input())
m = []
count = 0
for i in range(n):
	a = str(input())
	m.append(a)
for j in range(0, len(m)):
	if m[j] == 'X++' or m[j] == '++X':
		count += 1
	if m[j] == 'X--' or m[j] == '--X':
		count -= 1
print(count)


n = int(input())
k = 0
for i in range(n):
	str = input()
	if '--' not in str:
		k += 1
	else:
		k -= 1
print(k)


a = []
while True:
	try:
		a.append(input())
	except:
		break
n = int(a[0])
k = 0
for i in range(1, n + 1):
	if a[i].find('++') != -1:
		k += 1
	elif a[i].find('--') != -1:
		k -= 1
print(k)


number = int(input())
result = 0
for m in range(number):
	d = input()
	if d == '++X' or d == 'X++':
		result += 1
	elif d == '--X' or d == 'X--':
		result -= 1
print(result)


import math
import os
import random
import re
import sys

def function(s):
	pos = s.count('+')
	neg = s.count('-')
	pos = pos // 2
	neg = neg // 2
	if pos == neg:
		print(0)
	elif pos > neg:
		print(pos - neg)
	else:
		print(-neg + pos)
m = int(input())
s = ''
for _ in range(m):
	s = s + str(input())
function(s)


x = input()
y = int(x)
res = 0
for i in range(0, y):
	t = input()
	if t == '++X' or t == 'X++':
		res += 1
	else:
		res -= 1
print(res)


a = int(input())
b = []
c = 0
e = ''
for i in range(a):
	e = input()
	e = e.lower()
	b.append(e)
for i in range(a):
	if b[i] == 'x--' or b[i] == '--x':
		c = c - 1
	if b[i] == '++x' or b[i] == 'x++':
		c = c + 1
print(c)


n = int(input())
lines = []
for i in range(n):
	lines.append(input())
x = 0
for line in lines:
	if line.find('++') != -1:
		x += 1
	elif line.find('--') != -1:
		x -= 1
print(x)


print(sum([1 if '+' in input() else -1 for nr_of_problem in range(int(input()))]))


numero_inicial = int(input())
lista_operadores = []
for i in range(0, numero_inicial):
	lista_operadores.append(input())
numero = 0
for op in lista_operadores:
	if op == '--X' or op == 'X--':
		numero -= 1
	else:
		numero += 1
print(numero)


def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())
n = inp()
res = 0
for i in range(n):
	s = insr()
	if '-' in s:
		res -= 1
	else:
		res += 1
print(res)


count = int(input())
x = 0
for i in range(0, count):
	e = str(input())
	if '++' in e:
		x = x + 1
	if '--' in e:
		x = x - 1
print(x)


n = int(input())
ii = 0
if n >= 1 and n <= 150:
	listt = []
	for i in range(n):
		listt.append(input())
		if '+' in listt[i]:
			ii = ii + 1
		else:
			ii = ii - 1
	print(ii)


n = int(input())
L = []
E = []
O = []
for i in range(n):
	y = input()
	L.append(y)
for j in L:
	if j == 'X++':
		E.append(j)
	elif j == '++X':
		E.append(j)
	else:
		O.append(j)
x = 0
x = x + len(E)
x = x - len(O)
print(x)


n = int(input())
output = 0
for i in range(n):
	ope = input()
	if ope.count('+') == 2:
		output = output + 1
	else:
		output = output - 1
print(int(output))


import string
n = int(input())
a = []
r = 0
for i in range(n):
	s = input()
	a.append(s)
for i in range(len(a)):
	if '+' in a[i]:
		r = r + 1
	elif '-' in a[i]:
		r = r - 1
print(r)


sentences_count = int(input())
value = 0
for i in range(sentences_count):
	sentence = input()
	if sentence.replace('X', '') == '++':
		value += 1
	else:
		value -= 1
print(value)


n = int(input())
l = []
X = 0
i = 0
while i < n:
	s = str(input(''))
	if s:
		l.append(s)
	else:
		break
	i = i + 1
for i in l:
	if i == '--X' or i == 'X--':
		X = X - 1
	elif i == '++X' or i == 'X++':
		X = X + 1
print(X)


n = int(input())
sum = 0
for i in range(n):
	m = input()
	if m == '++X':
		sum += 1
	elif m == 'X++' and i < n:
		sum += 1
	elif m == '--X':
		sum -= 1
	elif m == 'X--' and i < n:
		sum -= 1
print(sum)


n = int(input())
add = 0
minus = 0
for i in range(0, n):
	stri = str(input())
	if '++' in stri:
		add += 1
	else:
		minus += 1
value = add - minus
print(value)


n = int(input(''))
d = 0
list = []
for i in range(0, n):
	s = str(input(''))
	l = s.split('X')
	for items in l:
		if items != '':
			if items == '++':
				d = d + 1
			elif items == '--':
				d = d - 1
print(d, end=' ')


inc = 0
dec = 0
operation = []
line = int(input())
for i in range(line):
	operator = input()
	operation.append(operator)
for item in operation:
	if item == 'X++' or item == '++X':
		inc += 1
	elif item == '--X' or item == 'X--':
		dec += -1
summation = inc + dec
print(summation)


n = int(input())
x = 0
if 1 <= n <= 150:
	for i in range(n):
		exp = input()
		if exp[0] == '+' or exp[-1] == '+':
			x += 1
		else:
			x -= 1
print(x)


n = eval(input())
x = 0
i = 1
while i <= n:
	o = str(input())
	j = 0
	while j < len(o):
		if o[j] == '-':
			x -= 1
			break
		elif o[j] == '+':
			x += 1
			break
		j += 1
	i += 1
print(x)


n = int(input())
i = 0
x = 0
while i < n:
	ln = input()
	if ln[1] == '+':
		x += 1
	else:
		x -= 1
	i += 1
print(x)


n = int(input())
x = 0
alist = []
for i in range(n):
	alist.append(input())
for j in range(len(alist)):
	if alist[j] == '++X' or alist[j] == 'X++':
		x += 1
	elif alist[j] == '--X' or alist[j] == 'X--':
		x -= 1
print(x)


n = int(input())
l = []
x = 0
for c in range(0, n):
	w = input()
	l.append(w)
for v in l:
	if v[1] is '+':
		x += 1
	else:
		x -= 1
print(x)


def bit():
	n = int(input())
	x = 0
	for _ in range(n):
		cmd = input()
		if cmd == 'X++' or cmd == '++X':
			x += 1
		else:
			x -= 1
	return x
print(bit())


n = int(input())
m = 0
for i in range(n):
	a = input()
	for j in range(len(a)):
		if a[j] == '+':
			m += 1
			break
		if a[j] == '-':
			m -= 1
			break
print(m)


x = int(input())
po = 0
for k in range(x):
	y = input()
	y = ' '.join(y)
	y = y.split()
	for s in range(3):
		if y[s] == '+':
			po = po + 1
			break
		if y[s] == '-':
			po = po - 1
			break
print(po)


n = int(input())
count = 0
for x in range(0, n):
	k = list(map(str, input().split()))
	for i in k:
		if i == 'X++' or i == '++X':
			count += 1
		if i == 'X--' or i == '--X':
			count -= 1
print(count)


a = input()
x = 0
b = []
for n in range(int(a)):
	b.append(input())
for n in range(int(a)):
	if '++' in b[n]:
		x += 1
	if '--' in b[n]:
		x -= 1
print(str(x))


def bit(l):
	cplus = 0
	cminus = 0
	for i in range(0, len(l)):
		if l[i].find('++') != -1:
			cplus += 1
		elif l[i].find('--') != -1:
			cminus += 1
	return 0 + cplus - cminus
n = int(input())
l = []
for i in range(0, n):
	a = input()
	l.append(a)
print(bit(l))


oper = int(input())
w = []
init = 0
for x in range(0, oper):
	strw = input()
	w.append(strw)
for i in w:
	if i == '++X' or i == 'X++':
		init += 1
	elif i == '--X' or i == 'X--':
		init -= 1
print(init)


tc = int(input())
sm = 0
for i in range(tc):
	raw = input()
	if raw[1] == '+':
		sm += 1
	else:
		sm -= 1
print(sm)


n = int(input())
X = 0
statements = []
while n > 0:
	statements.append(input())
	n -= 1
for i in statements:
	if i == '--X' or i == 'X--':
		X -= 1
	elif i == '++X' or i == 'X++':
		X += 1
	else:
		pass
print(X)


a = int(input())
s = 0
for i in range(a):
	b = str(input())
	if b == '++X' or b == 'X++':
		s = s + 1
	elif b == '--X' or b == 'X--':
		s = s - 1
print(s)


n = int(input())
plus = 0
for i in range(n):
	op = input()
	if '+' in op:
		plus += 1
print(str(2 * plus - n))


operation_count = int(input())
lst = []
x = 0
for i in range(operation_count):
	ele = input()
	lst.append(ele)
for i in lst:
	if i[0] + i[1] == '++' or i[1] + i[2] == '++':
		x += 1
	elif i[0] + i[1] == '--' or i[1] + i[2] == '--':
		x -= 1
print(x)


x = 0
n = int(input())
while n != 0:
	operation = list(input())
	if operation[1] == '+':
		x += 1
	elif operation[1] == '-':
		x -= 1
	n -= 1
print(x)


ops = input()
X = 0
increment = ('++X', 'X++')
for num in range(int(ops)):
	if input() in increment:
		X += 1
	else:
		X -= 1
print(X)


limit = int(input())
count = 0
for i in range(limit):
	read = input()
	string1 = str(read)
	if string1.find('-') >= 0:
		count = count - 1
	if string1.find('+') >= 0:
		count = count + 1
print(count)


import sys
from math import sqrt
inp = sys.stdin.readline
read = lambda : list(map(int, inp().split()))

def solve():
	x = 0
	for _ in range(int(inp())):
		x += 1 if '+' in inp() else -1
	print(x)
solve()


reiz = int(input())
i = 0
su = 0
while i < reiz:
	b = input()
	if b[1] == '+':
		su += 1
	else:
		su -= 1
	i += 1
print(su)


x = 0
for _ in range(int(input())):
	cmd = str(input()).lower()
	if cmd == '++x' or cmd == 'x++':
		x += 1
	elif cmd == '--x' or cmd == 'x--':
		x -= 1
print(x)


opr = int(input())
val = 0
for i in range(opr):
	Str = input()
	if Str == '++X' or Str == 'X++':
		val += 1
	elif Str == '--X' or Str == 'X--':
		val -= 1
print(val)


Operaties = []
x = 0
AantalOperaties = int(input())
for i in range(0, AantalOperaties):
	Operaties.append(input())
for j in range(0, AantalOperaties):
	if str(Operaties[j]) == '++X':
		x += 1
	elif str(Operaties[j]) == 'X++':
		x += 1
	elif str(Operaties[j]) == '+X+':
		x += 1
	else:
		x -= 1
print(x)


from sys import stdin, stdout
_ = stdin.readline()
x = 0
for line in stdin:
	line = line.rstrip()
	if line[0] == '+' or line[-1] == '+':
		x += 1
	else:
		x -= 1
stdout.write(str(x))


angka = int(input())
hasil = 0
for i in range(0, angka):
	kode = input()
	if kode == '++X' or kode == 'X++':
		hasil += 1
	elif kode == '--X' or kode == 'X--':
		hasil -= 1
print(hasil)


hm = int(input())
c = 0
while hm > 0:
	x = input()
	if x == 'X++' or x == '++X' or x == '++x' or (x == 'x++'):
		c += 1
	elif x == 'X--' or x == '--X' or x == '--x' or (x == 'x--'):
		c -= 1
	hm -= 1
print(c)


n = int(input())
x = 0
for i in range(n):
	a = input()
	x = eval('x' + a[1] + '1')
print(x)


n = int(input())
lis = []
zero = 0
for i in range(n):
	bit = input()
	lis.append(bit)
	if lis[i] == '++X' or lis[i] == 'X++':
		zero += 1
	else:
		zero -= 1
print(zero)


from sys import stdin
a = stdin.read().rstrip().split()
a = a[1:]
x = 0
for op in a:
	if op == '++X' or op == 'X++':
		x += 1
	else:
		x -= 1
print(x)


def solve():
	n = int(input())
	(x, fx) = (0, 0)
	for i in range(n):
		s = input()
		if s == '++X':
			x += 1
		elif s == 'X++':
			x += 1
		elif s == 'X--':
			x -= 1
		elif s == '--X':
			x -= 1
		if not (i != n - 1 and s not in ['X++', 'X--']):
			fx = x
	print(fx)
solve()


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
n = inp()
ans = 0
for _ in range(n):
	str = input()
	if str[0] == '+' or str[2] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


x = 0
n = 0
y = int(input())
while n < y:
	s = set(list(input()))
	for ss in s:
		if ss == '+':
			x += 1
		elif ss == '-':
			x -= 1
	n += 1
print(x)


s = int(input())
a = 0
for i in range(s):
	operation = input()
	if operation.replace('X', '') == '++':
		a += 1
	else:
		a -= 1
print(a)


N = int(input())
list = []
sum = 0
for i in range(0, N):
	list.append(input())
for i in list:
	if i == '++X' or i == 'X++':
		sum += 1
	else:
		sum += -1
print(sum)


num = 0
entrada = int(input())
for i in range(entrada):
	entradas = input()
	if entradas[0] == '+' or entradas[1] == '+':
		num += 1
	else:
		num -= 1
print(num)


lines = int(input())
answer = 0
for _ in range(lines):
	for line in input().split():
		for c in line:
			c = str(c)
			if c == '-':
				answer -= 1
				break
			elif c == '+':
				answer += 1
				break
print(answer)


inp = int(input(''))
lista = []
for i in range(inp):
	inpx = input('')
	lista.append(inpx)
x = 0
for i in lista:
	if '+' in i:
		x += 1
	else:
		x -= 1
print(x)


prikazov = int(input())
x = 0
for i in range(prikazov):
	prikaz = input()
	operacia = prikaz[1]
	if operacia == '+':
		x += 1
	elif operacia == '-':
		x -= 1
	else:
		print('zly vstup')
print(x)


cnt = 0
for _ in range(int(input())):
	s = input()
	if s[0] == '+' or s[1] == '+':
		cnt += 1
	elif s[0] == '-' or s[1] == '-':
		cnt -= 1
print(cnt)


n = int(input())
x = 0
while n > 0:
	line = input()
	if line[1] == '+':
		x += 1
	else:
		x -= 1
	n -= 1
print(x)


a = int(input())
count = 0
for i in range(a):
	z = input()
	if z == 'X++' or z == '++X':
		count += 1
	else:
		count -= 1
print(count)


a = int(input())
k = a
j = 0
while k > 0:
	s = input()
	if s == 'X++' or s == '++X':
		j += 1
	else:
		j -= 1
	k = k - 1
print(j)


from sys import stdin, stdout

def main():
	a = stdin.read().split('\n')[1:-1]
	s = '0'
	for e in a:
		s += f'{e[1]}1'
	stdout.write(str(eval(s)))
main()


n = int(input())
x = 0
while n:
	op = input()
	for i in range(len(op)):
		if op[i] == '+':
			x += 1
			break
		elif op[i] == '-':
			x -= 1
			break
	n -= 1
print(x)


n = int(input())
count = 0
for i in range(n):
	x = input()
	y = list(filter(lambda a: a.isalnum() == False, x))
	if y[0] == '+':
		count += 1
	else:
		count -= 1
print(count)


n = int(input())
ans = 0
for i in range(n):
	c = str(input())
	if c.find('+') >= 0:
		ans += 1
	else:
		ans -= 1
print(ans)


x = 0
for i in range(int(input())):
	string = input()
	cache = None
	if string[0] == 'X':
		cache = string[1:]
	else:
		cache = string[:2]
	if cache == '++':
		x += 1
	else:
		x -= 1
print(x)


import sys
import math
import os
n = int(input())
count = 0
for i in range(n):
	data = input()
	for k in range(len(data)):
		if data[k] == '+':
			count += 1
			break
		elif data[k] == '-':
			count -= 1
			break
print(count)


x = 0
for test_case in range(int(input())):
	string = input()
	if '++' in string:
		x += 1
	else:
		x -= 1
print(x)


def solve():
	n = int(input())
	x = 0
	for i in range(n):
		op = input()
		if op[0] == '+' or op[-1] == '+':
			x += 1
		else:
			x -= 1
	print(x)
solve()


n = int(input())
p = 0
while n > 0:
	s = input()
	n = n - 1
	if s[0] == '-' or s[2] == '-':
		p = p - 1
	elif s[0] == '+' or s[2] == '+':
		p = p + 1
print(p)


n = int(input())
current_value = 0
for i in range(n):
	statement = input().replace('X', '')
	if statement == '++':
		current_value += 1
	else:
		current_value -= 1
print(current_value)


n = int(input())
add = {'++X', 'X++'}
sub = {'--X', 'X--'}
res = 0
for i in range(n):
	statement = input()
	if statement in add:
		res += 1
	elif statement in sub:
		res -= 1
print(res)


operations = int(input())
ctr = 0
while operations > 0:
	operations -= 1
	s = input()
	if '+' in s:
		ctr += 1
	elif '-' in s:
		ctr -= 1
print(ctr)


n = int(input())
c = 0
for i in range(n):
	st = input()
	st = st.replace('X', '')
	if st == '++':
		c += 1
	else:
		c -= 1
print(c)


from collections import defaultdict

def main():
	import re
	n = int(input())
	x = 0
	for i in range(n):
		s = input()
		if re.search('\\+\\+', s):
			x += 1
		else:
			x -= 1
	print(x)
main()


n = int(input())
arr = []
for i in range(int(n)):
	x = str(input())
	arr.append(x)
i = 0
sum = 0
while i < len(arr):
	if arr[i] == 'X++' or arr[i] == '++X':
		sum += 1
	elif arr[i] == 'X--' or arr[i] == '--X':
		sum -= 1
	i += 1
print(sum)


def A282():
	n = int(input())
	x = 0
	for i in range(n):
		i = input()
		if '++' in i:
			x += 1
		else:
			x -= 1
	print(x)
A282()


n = int(input())
A = []
count = 0
for i in range(0, n):
	a = input()
	A.append(a)
for k in A:
	if k == '++X' or k == 'X++':
		count = count + 1
	elif k == '--X' or k == 'X--':
		count = count - 1
print(count)


try:
	x = 0
	n = int(input())
	while n:
		s = input()
		if '++' in s:
			x = x + 1
		elif '--' in s:
			x = x - 1
		n = n - 1
	print(x)
except:
	pass


x = 0
for ___ in range(int(input())):
	statements = list(input())
	for verify in statements:
		subtraction = True
		if verify == '+':
			x += 1
			subtraction = False
			break
	if subtraction:
		x -= 1
print(x)


def solve(n):
	c = 0
	while n:
		s = input()
		if s == 'X++' or s == '++X':
			c += 1
		elif s == 'X--' or s == '--X':
			c -= 1
		n -= 1
	return c
n = input()
print(solve(int(n)))


n = int(input())
ans = 0
while n > 0:
	line = sorted(list(input()))
	if line[0] == '+':
		ans += 1
	else:
		ans -= 1
	n -= 1
print(ans)


n = int(input())
x = 0
a = b = 0
for i in range(0, n):
	pieces = input()
	for element in pieces:
		if element == '+':
			a += 1
		if element == '-':
			b += 1
	a = int(a / 2)
	b = int(b / 2)
	x = x + a - b
print(x)


a = 0
t = int(input())
for i in range(0, t):
	s = input()
	if s[0] == '+' or s[len(s) - 1] == '+':
		a = a + 1
	else:
		a = a - 1
print(a)


n = eval(input())
s = 0
for i in range(n):
	a = input()
	if a == '++X' or a == 'X++':
		s = s + 1
	else:
		s = s - 1
print(s)


import string
Instructions = []
x = int(input())
Variable = 0
for i in range(0, x):
	Line = input()
	Instructions.append(Line)
for i in range(len(Instructions)):
	if Instructions[i][1] == '+':
		Variable += 1
	if Instructions[i][1] == '-':
		Variable -= 1
print(Variable)


count = 0
for _ in range(int(input())):
	x = input()
	if '++' in x:
		count += 1
	if '--' in x:
		count -= 1
print(count)


num = int(input())
if 1 <= num <= 150:
	result = 0
	l = []
	for i in range(num):
		l.append(input())
	for j in range(num):
		if '++' in l[j]:
			result += 1
		elif '--' in l[j]:
			result -= 1
	print(result)


n = int(input())
j = 0
for i in range(0, n):
	m = input()
	if m[0] == '+' or m[1] == '+':
		j = j + 1
	else:
		j = j - 1
print(j)


n = int(input())
fa = 0
for i in range(n):
	st = [x for x in input()]
	if st == ['+', '+', 'X']:
		fa = fa + 1
	elif st == ['X', '+', '+']:
		fa = fa + 1
	elif st == ['-', '-', 'X']:
		fa = fa - 1
	elif st == ['X', '-', '-']:
		fa = fa - 1
print(fa)


n = int(input())
x = 0
for i in range(n):
	str_operation = str(input())
	if str_operation[0] == '+' and str_operation[1] == '+' or (str_operation[1] == '+' and str_operation[2] == '+'):
		x += 1
	if str_operation[0] == '-' and str_operation[1] == '-' or (str_operation[1] == '-' and str_operation[2] == '-'):
		x -= 1
print(x)


n = int(input())
ans = 0
for i in range(n):
	s = input()
	if s[0] == '+' and s[1] == '+':
		ans += 1
	elif s[0] == '-' and s[1] == '-':
		ans -= 1
	elif s[1] == '-' and s[2] == '-':
		ans -= 1
	else:
		ans += 1
print(ans)


n = int(input())
contador = 0
while n != 0:
	entrada = str(input())
	if entrada == '++X' or entrada == 'X++':
		contador += 1
	elif entrada == '--X' or entrada == 'X--':
		contador -= 1
	n -= 1
print(contador)


operations = int(input())
operations_count = 0
for i in range(operations):
	operations_input = input()
	if operations_input == 'X++' or operations_input == '++X':
		operations_count += 1
	elif operations_input == 'X--' or operations_input == '--X':
		operations_count -= 1
	else:
		None
print(operations_count)


number = int(input())
total = 0
for i in range(number):
	new = input()
	if '+' in new:
		total += 1
	elif '-' in new:
		total -= 1
print(total)


n = int(input())
k = 0
for i in range(n):
	a = input()
	a = a.lower()
	if a == '++x' or a == 'x++':
		k += 1
	elif a == '--x' or a == 'x--':
		k -= 1
print(k)


b = int(input())
e = 0
for i in range(b):
	a = input()
	a = [i for i in a]
	for j in range(len(a)):
		if a[j] != 'X':
			if a[j] == '+':
				e = e + 1
				break
			if a[j] == '-':
				e = e - 1
				break
			break
print(e)


def get_values():
	try:
		bitx = 0
		num = int(input())
		if num >= 0 and num <= 150:
			for i in range(num):
				li = input()
				bitx += bitland(li)
			return print(bitx)
		else:
			return
	except ValueError:
		return

def bitland(m):
	x = 0
	counter = 0
	if '-' in m:
		x -= 1
	elif '+' in m:
		x += 1
	else:
		return None
	return x
get_values()


T = int(input())
x = 0
for i in range(T):
	command = input()
	if 'X' in command:
		if '++' in command:
			x += 1
		elif '--' in command:
			x -= 1
else:
	print(x)


x = int(input())
var = 0
for i in range(x):
	(x, y, z) = input()
	if x == '+' and y == '+' or (y == '+' and z == '+'):
		var += 1
	elif x == '-' and y == '-' or (y == '-' and z == '-'):
		var -= 1
print(var)


number_of_string = int(input())
x = 0
for _value in range(number_of_string):
	string = input()
	if string.count('+') > 1:
		x += 1
	elif string.count('-') > 1:
		x -= 1
print(x)


x = 0
list_of_operations = []
n = int(input())
for i in range(n):
	user_operation = input()
	list_of_operations.append(user_operation)
for z in list_of_operations:
	if '+' in z:
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
y = 0
variable = 0
while y < n:
	statement = input()
	if statement[1] == '+':
		variable = variable + 1
	if statement[1] == '-':
		variable = variable - 1
	y = y + 1
print(variable)


import os
import sys
debug = True
if debug and os.path.exists('input.in'):
	input = open('input.in', 'r').readline
else:
	debug = False
	input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())
test_count = 1
for t in range(test_count):
	if debug:
		print('Test Case #', t + 1)
	n = inp()
	ans = 0
	for i in range(n):
		if '++' in insr():
			ans += 1
		else:
			ans -= 1
	print(ans)


line = input()
line = int(line)
t = 1
x = 0
while t <= line:
	pgm = list(input())
	t += 1
	if '+' in pgm:
		x += 1
	elif '-' in pgm:
		x -= 1
print(x)


def main():
	x = 0
	n = int(input())
	for i in range(n):
		op = input()
		if op.find('++') != -1:
			x += 1
		else:
			x -= 1
	print(x)
main()


n = int(input())
cp = cn = 0
for i in range(n):
	s = input()
	if '+' in s:
		cp += 1
	else:
		cn += 1
print(cp - cn)


t = int(input())
x = 0
while t != 0:
	op = input()
	if '+' in op:
		x += 1
	elif '-' in op:
		x -= 1
	t -= 1
print(x)


thing = 0
for i in range(int(input())):
	for vs in input():
		if vs == '+':
			thing += 0.5
		elif vs == '-':
			thing -= 0.5
print(int(thing))


Casos = input()
i = 0
X = 0
while i < int(Casos):
	Valor = input()
	Cadena = list(Valor)
	if Cadena.count('+') == 2:
		X += 1
	else:
		X -= 1
	i += 1
print(X)


t = int(input())
c = k = 0
for _ in range(0, t):
	s = input()
	if s == '++X':
		c = c + 1
	elif s == 'X--':
		c = c - 1
	elif s == 'X++':
		c = c + 1
	elif s == '--X':
		c = c - 1
print(c)


n = int(input())
x = 0
for _ in range(n):
	a = str(input())
	if a == '++X':
		x = x + 1
	if a == 'X++':
		x = x + 1
	if a == '--X':
		x = x - 1
	if a == 'X--':
		x = x - 1
print(x)


def main(lines):
	del lines[0]
	x = 0
	for line in lines:
		if '++' in line[0]:
			x += 1
		else:
			x -= 1
	print(x)
n = input()
lines = [[n]]
for index in range(int(n)):
	lines.append([input()])
main(lines)


n = int(input())
x = 0
for i in range(n):
	s = input()
	for j in range(len(s)):
		if s[j] == '+':
			x += 1
		if s[j] == '-':
			x = x - 1
print(x // 2)


n = int(input())
r = 0
lst = []
for i in range(n):
	x = input()
	lst.append(x)
for i in lst:
	if i == 'X++' or i == '++X':
		r = r + 1
	elif i == '--X' or i == 'X--':
		r = r - 1
print(r)


dir = int(input())
p = 0
for i in range(dir):
	ert = input()
	if ert == 'X++' or ert == '++X':
		p += 1
	else:
		p -= 1
print(p)


X = 0
n = int(input())
for i in range(n):
	st = input()
	if st.startswith('++'):
		X += 1
	elif st.startswith('--'):
		X -= 1
	elif st[1:] == '++':
		X += 1
	elif st[1:] == '--':
		X -= 1
print(X)


n = int(input())
countplus = 0
countminus = 0
for _ in range(n):
	command = input()
	if '++' in command:
		countplus += 1
	if '--' in command:
		countminus += 1
print(countplus - countminus)


t = int(input())
x = 0
for m in range(t):
	i = input()
	if i == 'X++' or i == '++X':
		x = x + 1
	elif i == '--X' or i == 'X--':
		x = x - 1
print(x)


def solve(n, statements):
	X = 0
	statement = ['+', '-', 'X']
	for state in statements:
		for symbol in state:
			if symbol not in statement:
				return False
		if state[0] == '-' or state[-1] == '-':
			X -= 1
		elif state[0] == '+' or state[-1] == '+':
			X += 1
	return X
nop = int(input())
operator = []
for i in range(nop):
	opr = input()
	operator.append(opr)
print(solve(nop, operator))


n = int(input())
s = 0
list2 = []
for i in range(0, n):
	list2.append(input())
for x in list2:
	if x == '++X' or x == 'X++':
		s = s + 1
	if x == '--X' or x == 'X--':
		s = s - 1
print(s)


count = 0
for _ in range(int(input().strip())):
	if '+' in input():
		count += 1
		continue
	count -= 1
print(count)


n = int(input())
x = 0
while n > 0:
	a = input()
	if '+' in a:
		x += 1
	elif '-' in a:
		x -= 1
	n -= 1
print(x)


number = int(input())
ans = 0
for x in range(number):
	string = str(input())
	if string.count('+') > 0:
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
ans = 0
for i in range(n):
	string = input()
	if '++X' in string:
		ans += 1
	elif 'X++' in string:
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
x = 0
while n > 0:
	string = input()
	if string == '--X' or string == 'X--':
		x = x - 1
	if string == '++X' or string == 'X++':
		x = x + 1
	n = n - 1
print(x)


n = int(input())
t = 0
while n > 0:
	n -= 1
	s = input()
	s.upper()
	if s == '++X':
		t += 1
		continue
	if s == 'X++':
		t = t + 1
		continue
	if s == 'X--':
		t -= 1
		continue
	if s == '--X':
		t = t - 1
		continue
print(t)


n = int(input())
ans = 0
for val in range(n):
	op = input()
	if op[1] == '+':
		ans += 1
	else:
		ans -= 1
print(ans)


n = int(input())
b = []
c = []
for i in range(n):
	a = str(input())
	b.append(a)
for i in range(n):
	if b[i] == '++X' or b[i] == 'X++':
		c.append(1)
	elif b[i] == '--X' or b[i] == 'X--':
		c.append(-1)
print(sum(c))


n = int(input())
list1 = []
for i in range(0, n, 1):
	line = input()
	list1.append(line)
m = list1.count('X++') + list1.count('++X') - list1.count('X--') - list1.count('--X')
print(m)


n = int(input())
ans = 0
for i in range(n):
	t_b_p = input()
	x = 'X'
	minus = '--'
	plus = '++'
	if minus in t_b_p:
		ans -= 1
	if plus in t_b_p:
		ans += 1
print(ans)


a = int(input())
b = ['' for x in range(a)]
for x in range(a):
	b[x] = input()
wynik = 0
for x in range(a):
	if b[x] == '--X':
		wynik -= 1
	elif b[x] == 'X--':
		wynik -= 1
	elif b[x] == '++X':
		wynik += 1
	elif b[x] == 'X++':
		wynik += 1
print(wynik)


def main():
	times = int(input())
	n = 0
	for i in range(times):
		string = input()
		if '++' in string:
			n += 1
		else:
			n -= 1
	print(n)
main()


def bitOperation(n):
	x = 0
	for i in range(0, n):
		operation = input()
		if operation[1] == '+':
			x += 1
		else:
			x -= 1
	print(x)
n = int(input())
bitOperation(n)


c = 0
for _ in range(int(input())):
	s = str(input())
	if s == 'X++' or s == '++X':
		c += 1
	elif s == 'X--' or '--X':
		c -= 1
print(c)


n = int(input())
x = 0
for string in range(0, n):
	iter = input('')
	if iter[1] == '+':
		x += 1
	else:
		x -= 1
print(x)


n = int(input())
x = 0
for z in range(n):
	k = str(input())
	if k == 'X++' or k == '++X':
		x += 1
	else:
		x -= 1
print(x)


x = 0
for i in range(int(input())):
	x += input().count('+') > 0 or -1
print(x)


eks_input = int(input(''))
a = 0
while eks_input > 0:
	ye = input('')
	if ye.lower() == '++x' or ye.lower() == 'x++':
		a += 1
	elif ye.lower() == '--x' or ye.lower() == 'x--':
		a -= 1
	eks_input -= 1
print(a)


var = input()
count = 0
num = 0
while count < int(var):
	count = count + 1
	word = input()
	if word[1] == '+':
		num = num + 1
	elif word[1] == '-':
		num = num - 1
print(num)


N = int(input())
s = 0
for i in range(1, N + 1):
	l = list(input())
	if l[1] == '+':
		s += 1
	if l[1] == '-':
		s += -1
print(s)