
import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		
		int a[] = new int[3], cost = 0;
		for (int i = 0; i < 3; i++)
		{
			a[i] = scan.nextInt();
		}
		scan.close();
		java.util.Arrays.sort(a);
		cost += a[1] - a[0];
		cost += a[2] - a[1];
		System.out.println(cost);
	}
}
 import java.util.Scanner; Scanner java.util public class Main
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		
		int a[] = new int[3], cost = 0;
		for (int i = 0; i < 3; i++)
		{
			a[i] = scan.nextInt();
		}
		scan.close();
		java.util.Arrays.sort(a);
		cost += a[1] - a[0];
		cost += a[2] - a[1];
		System.out.println(cost);
	}
} Main public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		
		int a[] = new int[3], cost = 0;
		for (int i = 0; i < 3; i++)
		{
			a[i] = scan.nextInt();
		}
		scan.close();
		java.util.Arrays.sort(a);
		cost += a[1] - a[0];
		cost += a[2] - a[1];
		System.out.println(cost);
	} main {
		Scanner scan = new Scanner(System.in);
		
		int a[] = new int[3], cost = 0;
		for (int i = 0; i < 3; i++)
		{
			a[i] = scan.nextInt();
		}
		scan.close();
		java.util.Arrays.sort(a);
		cost += a[1] - a[0];
		cost += a[2] - a[1];
		System.out.println(cost);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a[] = new int[3] a new int[3] 3 cost = 0; cost 0 for (int i = 0; i < 3; i++)
		{
			a[i] = scan.nextInt();
		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
			a[i] = scan.nextInt();
		} {
			a[i] = scan.nextInt();
		} a[i] = scan.nextInt() a[i] a i scan.nextInt() scan.nextInt scan scan.close() scan.close scan java.util.Arrays.sort(a) java.util.Arrays.sort java.util.Arrays java.util java java.util java.util.Arrays a cost += a[1] - a[0] cost a[1] - a[0] a[1] a 1 a[0] a 0 cost += a[2] - a[1] cost a[2] - a[1] a[2] a 2 a[1] a 1 System.out.println(cost) System.out.println System.out System System.out cost String[] args args public class Main
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		
		int a[] = new int[3], cost = 0;
		for (int i = 0; i < 3; i++)
		{
			a[i] = scan.nextInt();
		}
		scan.close();
		java.util.Arrays.sort(a);
		cost += a[1] - a[0];
		cost += a[2] - a[1];
		System.out.println(cost);
	}
} public class Main
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		
		int a[] = new int[3], cost = 0;
		for (int i = 0; i < 3; i++)
		{
			a[i] = scan.nextInt();
		}
		scan.close();
		java.util.Arrays.sort(a);
		cost += a[1] - a[0];
		cost += a[2] - a[1];
		System.out.println(cost);
	}
} Main

import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		
		int a[] = new int[3], cost = 0;
		for (int i = 0; i < 3; i++)
		{
			a[i] = scan.nextInt();
		}
		scan.close();
		java.util.Arrays.sort(a);
		cost += a[1] - a[0];
		cost += a[2] - a[1];
		System.out.println(cost);
	}
}

