using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProCon
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');
            int min = 10000;
            int max = 0;
            for ( int i = 0; i < input.Length; ++i)
            {
                int t = int.Parse(input[i]);
                if (min > t)
                {
                    min = t;
                }
                if(max < t)
                {
                    max = t;
                }
            }
            Console.WriteLine(max - min);
        }
    }
}
