function Main(input){
	for(var i = 0, ans = 0; i < input.length; i++){
    ans += (input[i] === '+');
    }
   	if(ans == 4){
    var x = 4;
    console.log(x);
    }else if(ans == 3){
    var x = 2
    console.log(x);
    }else if(ans == 2){
    var x = 0;
    console.log(x);
    }else if(ans == 1){
    var x = -2;
    console.log(x);
    }else{
    var x = -4
    console.log(x);
    }
}

Main(require("fs").readFileSync("/dev/stdin","utf8"));