using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            // 101 Problem A
            string input = Console.ReadLine();
            if (input = "++++"){ Console.WriteLine(4);}
            if (input = "-+++"  || input = "+-++" || input = "++-+" || input = "+++-") { Console.WriteLine(2); }
            if (input = "--++" || input = "-+-+" || input = "-++-" || input = "+--+" || input = "+-+-" || input = "++--") { Console.WriteLine(0); }
            if (input = "+---" || input = "-+--" || input = "--+-" || input = "---+") { Console.WriteLine(-2); }
            if (input = "----") { Console.WriteLine(-4); }
        }