import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String n = sc.next();
        char tar ='+';
        int a =0;

        for(char x: n.toCharArray()){
            if(x == tar){
                a++;
            }
        }

        if(a == 0){
            System.out.println("-4");
        }else if(a == 1){
            System.out.println("-2");
        }else if(a == 2){
            System.out.println("0");
        }else if(a == 3){
            System.out.println("2");
        }else{
            System.out.println("4");
        }

    }
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String n = sc.next();
        char tar ='+';
        int a =0;

        for(char x: n.toCharArray()){
            if(x == tar){
                a++;
            }
        }

        if(a == 0){
            System.out.println("-4");
        }else if(a == 1){
            System.out.println("-2");
        }else if(a == 2){
            System.out.println("0");
        }else if(a == 3){
            System.out.println("2");
        }else{
            System.out.println("4");
        }

    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String n = sc.next();
        char tar ='+';
        int a =0;

        for(char x: n.toCharArray()){
            if(x == tar){
                a++;
            }
        }

        if(a == 0){
            System.out.println("-4");
        }else if(a == 1){
            System.out.println("-2");
        }else if(a == 2){
            System.out.println("0");
        }else if(a == 3){
            System.out.println("2");
        }else{
            System.out.println("4");
        }

    } main {
        Scanner sc = new Scanner(System.in);
        String n = sc.next();
        char tar ='+';
        int a =0;

        for(char x: n.toCharArray()){
            if(x == tar){
                a++;
            }
        }

        if(a == 0){
            System.out.println("-4");
        }else if(a == 1){
            System.out.println("-2");
        }else if(a == 2){
            System.out.println("0");
        }else if(a == 3){
            System.out.println("2");
        }else{
            System.out.println("4");
        }

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String n = sc.next(); n sc.next() sc.next sc char tar ='+'; tar '+' int a =0; a 0 for(char x: n.toCharArray()){
            if(x == tar){
                a++;
            }
        } char x n.toCharArray() n.toCharArray n {
            if(x == tar){
                a++;
            }
        } {
            if(x == tar){
                a++;
            }
        } if(x == tar){
                a++;
            } x == tar x tar {
                a++;
            } a++ a if(a == 0){
            System.out.println("-4");
        }else if(a == 1){
            System.out.println("-2");
        }else if(a == 2){
            System.out.println("0");
        }else if(a == 3){
            System.out.println("2");
        }else{
            System.out.println("4");
        } a == 0 a 0 {
            System.out.println("-4");
        } System.out.println("-4") System.out.println System.out System System.out "-4" if(a == 1){
            System.out.println("-2");
        }else if(a == 2){
            System.out.println("0");
        }else if(a == 3){
            System.out.println("2");
        }else{
            System.out.println("4");
        } a == 1 a 1 {
            System.out.println("-2");
        } System.out.println("-2") System.out.println System.out System System.out "-2" if(a == 2){
            System.out.println("0");
        }else if(a == 3){
            System.out.println("2");
        }else{
            System.out.println("4");
        } a == 2 a 2 {
            System.out.println("0");
        } System.out.println("0") System.out.println System.out System System.out "0" if(a == 3){
            System.out.println("2");
        }else{
            System.out.println("4");
        } a == 3 a 3 {
            System.out.println("2");
        } System.out.println("2") System.out.println System.out System System.out "2" {
            System.out.println("4");
        } 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 n = sc.next();
        char tar ='+';
        int a =0;

        for(char x: n.toCharArray()){
            if(x == tar){
                a++;
            }
        }

        if(a == 0){
            System.out.println("-4");
        }else if(a == 1){
            System.out.println("-2");
        }else if(a == 2){
            System.out.println("0");
        }else if(a == 3){
            System.out.println("2");
        }else{
            System.out.println("4");
        }

    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String n = sc.next();
        char tar ='+';
        int a =0;

        for(char x: n.toCharArray()){
            if(x == tar){
                a++;
            }
        }

        if(a == 0){
            System.out.println("-4");
        }else if(a == 1){
            System.out.println("-2");
        }else if(a == 2){
            System.out.println("0");
        }else if(a == 3){
            System.out.println("2");
        }else{
            System.out.println("4");
        }

    }
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String n = sc.next();
        char tar ='+';
        int a =0;

        for(char x: n.toCharArray()){
            if(x == tar){
                a++;
            }
        }

        if(a == 0){
            System.out.println("-4");
        }else if(a == 1){
            System.out.println("-2");
        }else if(a == 2){
            System.out.println("0");
        }else if(a == 3){
            System.out.println("2");
        }else{
            System.out.println("4");
        }

    }
}
