a,b,c,d = map(input().split())

if a='+' b='+' c='+' d='+':
	print('4')
elif a='+' b='+' c='+' d='-':
	print('2')
elif a='+' b='+' c='-' d='+':
	print('2')
elif a='+' b='+' c='-' d='-':
	print('0')
elif a='+' b='-' c='+' d='+':
	print('2')
elif a='+' b='-' c='+' d='-':
	print('0')
elif a='+' b='-' c='-' d='+':
	print('0')
elif a='+' b='-' c='-' d='-':
	print('-2')
elif a='-' b='+' c='+' d='+':
	print('2')
elif a='-' b='+' c='+' d='-':
	print('0')
elif a='-' b='+' c='-' d='+':
	print('0')	
elif a='-' b='+' c='-' d='-':
	print('-2')
elif a='-' b='-' c='-' d='+':
	print('-2')
elif a='-' b='-' c='+' d='-':
	print('-2')
elif a='-' b='-' c='-' d='+':
	print('-2')
else a='-' b='-' c='-' d='-':
	print('-4')


