let rec arr_string str =
        let length = String.length str in
        match length with
        | 0 -> []
       | len ->
                let first = String.sub str 0 1 in
                let rest = String.sub str 1 (len - 1) in
                (String.get first 0) :: (arr_string rest)
                
let rec sum ls = match ls with
    | [] -> 0
    | (x::xs) -> x + (sum xs)            
                
let eval ch = match ch with
    | '+' -> 1
    | '-' -> -1
    | _ -> 0
    
let () =
    let line = read_line () in
    let arr = arr_string line in
    print_endline (string_of_int (sum (List.map eval arr)))