using System;

namespace ABC101A
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int i = 0;
            for (int a = 0;a <4;a++)
            {
                int y = 0;
                y = y + i;
                if (s.Substring(y, 1) == "+")
                    i = i + 1;
                else
                    i = i - 1;

            }
            Console.ReadKey();
        }
    }
}
