program name
    use,intrinsic :: iso_fortran_env
    implicit none
    character(4):: s
    integer(int32):: i,ans

    read*, s
    ans=0
    do i=1,4
        if (s(i:i) == '+')then
            ans=ans+1
        else
            ans=ans-1
        end if
    end do

    print*, ans
end program name