function Main(input) {
    cnt = 0;
    function count(a) {
        if (a == '+') cnt++;
    }
    input = input.split("").map(count);
    console.log(2 * cnt - 4);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));