open Scanf
open Printf

let explode s =
  let rec exp i l =
    if i < 0 then l else exp (i - 1) (s.[i] :: l) in
  exp (String.length s - 1) []

let symbol s =
  let lst = explode s in
  let rec sym lst = match lst  with
      [] -> 0
    | first :: rest -> if first = '+' then 1 + sym rest
                                      else (-1) + sym rest
  in
    sym lst

let () = scanf "%s" symbol |> printf "%d\n"
