import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        int p = 0;
        int m = 0;
        String a = "+";

        for(int i=0; i<4; i++){
            if(s.charAt(i)==a.charAt(0)){
                p += 1;
            }
        }
        m = 4 - p;

        System.out.println(p - m);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        int p = 0;
        int m = 0;
        String a = "+";

        for(int i=0; i<4; i++){
            if(s.charAt(i)==a.charAt(0)){
                p += 1;
            }
        }
        m = 4 - p;

        System.out.println(p - m);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        int p = 0;
        int m = 0;
        String a = "+";

        for(int i=0; i<4; i++){
            if(s.charAt(i)==a.charAt(0)){
                p += 1;
            }
        }
        m = 4 - p;

        System.out.println(p - m);
    } main {
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        int p = 0;
        int m = 0;
        String a = "+";

        for(int i=0; i<4; i++){
            if(s.charAt(i)==a.charAt(0)){
                p += 1;
            }
        }
        m = 4 - p;

        System.out.println(p - m);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int p = 0; p 0 int m = 0; m 0 String a = "+"; a "+" for(int i=0; i<4; i++){
            if(s.charAt(i)==a.charAt(0)){
                p += 1;
            }
        } int i=0; int i=0; i 0 i<4 i 4 i++ i++ i {
            if(s.charAt(i)==a.charAt(0)){
                p += 1;
            }
        } {
            if(s.charAt(i)==a.charAt(0)){
                p += 1;
            }
        } if(s.charAt(i)==a.charAt(0)){
                p += 1;
            } s.charAt(i)==a.charAt(0) s.charAt(i) s.charAt s i a.charAt(0) a.charAt a 0 {
                p += 1;
            } p += 1 p 1 m = 4 - p m 4 - p 4 p System.out.println(p - m) System.out.println System.out System System.out p - m p m String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        int p = 0;
        int m = 0;
        String a = "+";

        for(int i=0; i<4; i++){
            if(s.charAt(i)==a.charAt(0)){
                p += 1;
            }
        }
        m = 4 - p;

        System.out.println(p - m);
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        int p = 0;
        int m = 0;
        String a = "+";

        for(int i=0; i<4; i++){
            if(s.charAt(i)==a.charAt(0)){
                p += 1;
            }
        }
        m = 4 - p;

        System.out.println(p - m);
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        int p = 0;
        int m = 0;
        String a = "+";

        for(int i=0; i<4; i++){
            if(s.charAt(i)==a.charAt(0)){
                p += 1;
            }
        }
        m = 4 - p;

        System.out.println(p - m);
    }
}