-- modules to import --

import Data.ByteString.Char8
import Prelude

-- functions for this task --

convert_sign :: ByteString -> Int
convert_sign string_given
        | Data.ByteString.Char8.head string_given == '+' =  1
        | Data.ByteString.Char8.head string_given == '-' = -1

task_A :: ByteString -> Int
task_A string_given
        | Data.ByteString.Char8.length string_given > 0 = (convert_sign $ string_given) + (task_A $ Data.ByteString.Char8.tail $ string_given)
        | otherwise                                     = 0

-- main process is below --

main :: IO ()
main = do

        -- STEP.01
        -- read out the given string
        string_given <- Data.ByteString.Char8.getLine

        -- STEP.02
        -- output the answer of this task
        Prelude.print $ task_A $ string_given

-- End of this source code --