import java.util.Arrays;
import java.util.Scanner;

public class Main{

	public static void main(String[] args) 
	{
		Scanner s = new Scanner(System.in);		
		int taskCost[] = new int[3];
		for(int i = 0; i< 3 ; i++)
		{
			taskCost[i] = s.nextInt();
		}
		int minCost = 0;
		Arrays.sort(taskCost);
		for(int i = 1; i>= 0; i--)
		{
			minCost = minCost + Math.abs(taskCost[i+1]-taskCost[i]);
		}
		System.out.println(minCost);

	}

} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args) 
	{
		Scanner s = new Scanner(System.in);		
		int taskCost[] = new int[3];
		for(int i = 0; i< 3 ; i++)
		{
			taskCost[i] = s.nextInt();
		}
		int minCost = 0;
		Arrays.sort(taskCost);
		for(int i = 1; i>= 0; i--)
		{
			minCost = minCost + Math.abs(taskCost[i+1]-taskCost[i]);
		}
		System.out.println(minCost);

	}

} Main public static void main(String[] args) 
	{
		Scanner s = new Scanner(System.in);		
		int taskCost[] = new int[3];
		for(int i = 0; i< 3 ; i++)
		{
			taskCost[i] = s.nextInt();
		}
		int minCost = 0;
		Arrays.sort(taskCost);
		for(int i = 1; i>= 0; i--)
		{
			minCost = minCost + Math.abs(taskCost[i+1]-taskCost[i]);
		}
		System.out.println(minCost);

	} main {
		Scanner s = new Scanner(System.in);		
		int taskCost[] = new int[3];
		for(int i = 0; i< 3 ; i++)
		{
			taskCost[i] = s.nextInt();
		}
		int minCost = 0;
		Arrays.sort(taskCost);
		for(int i = 1; i>= 0; i--)
		{
			minCost = minCost + Math.abs(taskCost[i+1]-taskCost[i]);
		}
		System.out.println(minCost);

	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int taskCost[] = new int[3]; taskCost new int[3] 3 for(int i = 0; i< 3 ; i++)
		{
			taskCost[i] = s.nextInt();
		} int i = 0; int i = 0; i 0 i< 3 i 3 i++ i++ i {
			taskCost[i] = s.nextInt();
		} {
			taskCost[i] = s.nextInt();
		} taskCost[i] = s.nextInt() taskCost[i] taskCost i s.nextInt() s.nextInt s int minCost = 0; minCost 0 Arrays.sort(taskCost) Arrays.sort Arrays taskCost for(int i = 1; i>= 0; i--)
		{
			minCost = minCost + Math.abs(taskCost[i+1]-taskCost[i]);
		} int i = 1; int i = 1; i 1 i>= 0 i 0 i-- i-- i {
			minCost = minCost + Math.abs(taskCost[i+1]-taskCost[i]);
		} {
			minCost = minCost + Math.abs(taskCost[i+1]-taskCost[i]);
		} minCost = minCost + Math.abs(taskCost[i+1]-taskCost[i]) minCost minCost + Math.abs(taskCost[i+1]-taskCost[i]) minCost Math.abs(taskCost[i+1]-taskCost[i]) Math.abs Math taskCost[i+1]-taskCost[i] taskCost[i+1] taskCost i+1 i 1 taskCost[i] taskCost i System.out.println(minCost) System.out.println System.out System System.out minCost String[] args args public class Main{

	public static void main(String[] args) 
	{
		Scanner s = new Scanner(System.in);		
		int taskCost[] = new int[3];
		for(int i = 0; i< 3 ; i++)
		{
			taskCost[i] = s.nextInt();
		}
		int minCost = 0;
		Arrays.sort(taskCost);
		for(int i = 1; i>= 0; i--)
		{
			minCost = minCost + Math.abs(taskCost[i+1]-taskCost[i]);
		}
		System.out.println(minCost);

	}

} public class Main{

	public static void main(String[] args) 
	{
		Scanner s = new Scanner(System.in);		
		int taskCost[] = new int[3];
		for(int i = 0; i< 3 ; i++)
		{
			taskCost[i] = s.nextInt();
		}
		int minCost = 0;
		Arrays.sort(taskCost);
		for(int i = 1; i>= 0; i--)
		{
			minCost = minCost + Math.abs(taskCost[i+1]-taskCost[i]);
		}
		System.out.println(minCost);

	}

} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main{

	public static void main(String[] args) 
	{
		Scanner s = new Scanner(System.in);		
		int taskCost[] = new int[3];
		for(int i = 0; i< 3 ; i++)
		{
			taskCost[i] = s.nextInt();
		}
		int minCost = 0;
		Arrays.sort(taskCost);
		for(int i = 1; i>= 0; i--)
		{
			minCost = minCost + Math.abs(taskCost[i+1]-taskCost[i]);
		}
		System.out.println(minCost);

	}

}
