program test
implicit none

character(4) :: eat
integer :: i,j,k,l,m,n

read(*,*) eat
if(eat=='++++') then
	write(*,*) 4
else if(eat=='-+++' .or. eat=='+-++' .or. eat=='++-+' .or. eat=='+++-') then
	write(*,*) 2
else if (eat=='----') then
	write(*,*) -4
else if (eat=='---+' .or. eat=='--+-' .or. eat=='-+--' .or. eat=='+---') then
	write(*,*) -2
else
	write(*,*) 0
endif

end program