import java.util.*;


public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        if(line.equals("----"))
        System.out.println(-4);
        if(line.equals("-+--")||line.equals("+---")||line.equals("--+-")||line.equals("---+"))
        System.out.println(-2);
        if(line.equals("++--")||line.equals("+-+-")||line.equals("+--+")||line.equals("-++-")||line.equals("-+-+")||line.equals("--++"))
        System.out.println(0);
        if(line.equals("++++"))
        System.out.println(4);
        if(line.equals("+++-")||line.equals("++-+")||line.equals("+-++")||line.equals("-+++"))
        System.out.println(2);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        if(line.equals("----"))
        System.out.println(-4);
        if(line.equals("-+--")||line.equals("+---")||line.equals("--+-")||line.equals("---+"))
        System.out.println(-2);
        if(line.equals("++--")||line.equals("+-+-")||line.equals("+--+")||line.equals("-++-")||line.equals("-+-+")||line.equals("--++"))
        System.out.println(0);
        if(line.equals("++++"))
        System.out.println(4);
        if(line.equals("+++-")||line.equals("++-+")||line.equals("+-++")||line.equals("-+++"))
        System.out.println(2);
    }
} Main public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        if(line.equals("----"))
        System.out.println(-4);
        if(line.equals("-+--")||line.equals("+---")||line.equals("--+-")||line.equals("---+"))
        System.out.println(-2);
        if(line.equals("++--")||line.equals("+-+-")||line.equals("+--+")||line.equals("-++-")||line.equals("-+-+")||line.equals("--++"))
        System.out.println(0);
        if(line.equals("++++"))
        System.out.println(4);
        if(line.equals("+++-")||line.equals("++-+")||line.equals("+-++")||line.equals("-+++"))
        System.out.println(2);
    } main {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        if(line.equals("----"))
        System.out.println(-4);
        if(line.equals("-+--")||line.equals("+---")||line.equals("--+-")||line.equals("---+"))
        System.out.println(-2);
        if(line.equals("++--")||line.equals("+-+-")||line.equals("+--+")||line.equals("-++-")||line.equals("-+-+")||line.equals("--++"))
        System.out.println(0);
        if(line.equals("++++"))
        System.out.println(4);
        if(line.equals("+++-")||line.equals("++-+")||line.equals("+-++")||line.equals("-+++"))
        System.out.println(2);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc if(line.equals("----"))
        System.out.println(-4); line.equals("----") line.equals line "----" System.out.println(-4) System.out.println System.out System System.out -4 4 if(line.equals("-+--")||line.equals("+---")||line.equals("--+-")||line.equals("---+"))
        System.out.println(-2); line.equals("-+--")||line.equals("+---")||line.equals("--+-")||line.equals("---+") line.equals("--+-") line.equals("-+--")||line.equals("+---")||line.equals("--+-")||line.equals("---+") line.equals("-+--") line.equals line "-+--" line.equals("+---") line.equals line "+---" line.equals("--+-") line.equals line "--+-" line.equals("---+") line.equals line "---+" System.out.println(-2) System.out.println System.out System System.out -2 2 if(line.equals("++--")||line.equals("+-+-")||line.equals("+--+")||line.equals("-++-")||line.equals("-+-+")||line.equals("--++"))
        System.out.println(0); line.equals("++--")||line.equals("+-+-")||line.equals("+--+")||line.equals("-++-")||line.equals("-+-+")||line.equals("--++") line.equals("-+-+") line.equals("-++-") line.equals("+--+") line.equals("++--")||line.equals("+-+-")||line.equals("+--+")||line.equals("-++-")||line.equals("-+-+")||line.equals("--++") line.equals("++--") line.equals line "++--" line.equals("+-+-") line.equals line "+-+-" line.equals("+--+") line.equals line "+--+" line.equals("-++-") line.equals line "-++-" line.equals("-+-+") line.equals line "-+-+" line.equals("--++") line.equals line "--++" System.out.println(0) System.out.println System.out System System.out 0 if(line.equals("++++"))
        System.out.println(4); line.equals("++++") line.equals line "++++" System.out.println(4) System.out.println System.out System System.out 4 if(line.equals("+++-")||line.equals("++-+")||line.equals("+-++")||line.equals("-+++"))
        System.out.println(2); line.equals("+++-")||line.equals("++-+")||line.equals("+-++")||line.equals("-+++") line.equals("+-++") line.equals("+++-")||line.equals("++-+")||line.equals("+-++")||line.equals("-+++") line.equals("+++-") line.equals line "+++-" line.equals("++-+") line.equals line "++-+" line.equals("+-++") line.equals line "+-++" line.equals("-+++") line.equals line "-+++" System.out.println(2) System.out.println System.out System System.out 2 String[] args args public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        if(line.equals("----"))
        System.out.println(-4);
        if(line.equals("-+--")||line.equals("+---")||line.equals("--+-")||line.equals("---+"))
        System.out.println(-2);
        if(line.equals("++--")||line.equals("+-+-")||line.equals("+--+")||line.equals("-++-")||line.equals("-+-+")||line.equals("--++"))
        System.out.println(0);
        if(line.equals("++++"))
        System.out.println(4);
        if(line.equals("+++-")||line.equals("++-+")||line.equals("+-++")||line.equals("-+++"))
        System.out.println(2);
    }
} public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        if(line.equals("----"))
        System.out.println(-4);
        if(line.equals("-+--")||line.equals("+---")||line.equals("--+-")||line.equals("---+"))
        System.out.println(-2);
        if(line.equals("++--")||line.equals("+-+-")||line.equals("+--+")||line.equals("-++-")||line.equals("-+-+")||line.equals("--++"))
        System.out.println(0);
        if(line.equals("++++"))
        System.out.println(4);
        if(line.equals("+++-")||line.equals("++-+")||line.equals("+-++")||line.equals("-+++"))
        System.out.println(2);
    }
} Main
import java.util.*;


public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        if(line.equals("----"))
        System.out.println(-4);
        if(line.equals("-+--")||line.equals("+---")||line.equals("--+-")||line.equals("---+"))
        System.out.println(-2);
        if(line.equals("++--")||line.equals("+-+-")||line.equals("+--+")||line.equals("-++-")||line.equals("-+-+")||line.equals("--++"))
        System.out.println(0);
        if(line.equals("++++"))
        System.out.println(4);
        if(line.equals("+++-")||line.equals("++-+")||line.equals("+-++")||line.equals("-+++"))
        System.out.println(2);
    }
}