import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		S = S.replaceAll("-","");
		if(S.equals(""))System.out.println("-4");
		if(S.equals("+"))System.out.println("-2");
		if(S.equals("++"))System.out.println("0");
		if(S.equals("+++"))System.out.println("2");
		if(S.equals("++++"))System.out.println("4");
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		S = S.replaceAll("-","");
		if(S.equals(""))System.out.println("-4");
		if(S.equals("+"))System.out.println("-2");
		if(S.equals("++"))System.out.println("0");
		if(S.equals("+++"))System.out.println("2");
		if(S.equals("++++"))System.out.println("4");
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		S = S.replaceAll("-","");
		if(S.equals(""))System.out.println("-4");
		if(S.equals("+"))System.out.println("-2");
		if(S.equals("++"))System.out.println("0");
		if(S.equals("+++"))System.out.println("2");
		if(S.equals("++++"))System.out.println("4");
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		S = S.replaceAll("-","");
		if(S.equals(""))System.out.println("-4");
		if(S.equals("+"))System.out.println("-2");
		if(S.equals("++"))System.out.println("0");
		if(S.equals("+++"))System.out.println("2");
		if(S.equals("++++"))System.out.println("4");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc S = S.replaceAll("-","") S S.replaceAll("-","") S.replaceAll S "-" "" if(S.equals(""))System.out.println("-4"); S.equals("") S.equals S "" System.out.println("-4") System.out.println System.out System System.out "-4" if(S.equals("+"))System.out.println("-2"); S.equals("+") S.equals S "+" System.out.println("-2") System.out.println System.out System System.out "-2" if(S.equals("++"))System.out.println("0"); S.equals("++") S.equals S "++" System.out.println("0") System.out.println System.out System System.out "0" if(S.equals("+++"))System.out.println("2"); S.equals("+++") S.equals S "+++" System.out.println("2") System.out.println System.out System System.out "2" if(S.equals("++++"))System.out.println("4"); S.equals("++++") S.equals S "++++" System.out.println("4") System.out.println System.out System System.out "4" String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		S = S.replaceAll("-","");
		if(S.equals(""))System.out.println("-4");
		if(S.equals("+"))System.out.println("-2");
		if(S.equals("++"))System.out.println("0");
		if(S.equals("+++"))System.out.println("2");
		if(S.equals("++++"))System.out.println("4");
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		S = S.replaceAll("-","");
		if(S.equals(""))System.out.println("-4");
		if(S.equals("+"))System.out.println("-2");
		if(S.equals("++"))System.out.println("0");
		if(S.equals("+++"))System.out.println("2");
		if(S.equals("++++"))System.out.println("4");
	}
} Main
import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		S = S.replaceAll("-","");
		if(S.equals(""))System.out.println("-4");
		if(S.equals("+"))System.out.println("-2");
		if(S.equals("++"))System.out.println("0");
		if(S.equals("+++"))System.out.println("2");
		if(S.equals("++++"))System.out.println("4");
	}
}