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

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int[] costArray = { scanner.nextInt(), scanner.nextInt(), scanner.nextInt() };
		Arrays.sort(costArray);
		int ans = 0 + Math.abs(costArray[1] - costArray[0]) + Math.abs(costArray[2] - costArray[1]);
		System.out.println(ans);
		scanner.close();
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int[] costArray = { scanner.nextInt(), scanner.nextInt(), scanner.nextInt() };
		Arrays.sort(costArray);
		int ans = 0 + Math.abs(costArray[1] - costArray[0]) + Math.abs(costArray[2] - costArray[1]);
		System.out.println(ans);
		scanner.close();
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int[] costArray = { scanner.nextInt(), scanner.nextInt(), scanner.nextInt() };
		Arrays.sort(costArray);
		int ans = 0 + Math.abs(costArray[1] - costArray[0]) + Math.abs(costArray[2] - costArray[1]);
		System.out.println(ans);
		scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);
		int[] costArray = { scanner.nextInt(), scanner.nextInt(), scanner.nextInt() };
		Arrays.sort(costArray);
		int ans = 0 + Math.abs(costArray[1] - costArray[0]) + Math.abs(costArray[2] - costArray[1]);
		System.out.println(ans);
		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int[] costArray = { scanner.nextInt(), scanner.nextInt(), scanner.nextInt() }; costArray { scanner.nextInt(), scanner.nextInt(), scanner.nextInt() } scanner.nextInt() scanner.nextInt scanner scanner.nextInt() scanner.nextInt scanner scanner.nextInt() scanner.nextInt scanner Arrays.sort(costArray) Arrays.sort Arrays costArray int ans = 0 + Math.abs(costArray[1] - costArray[0]) + Math.abs(costArray[2] - costArray[1]); ans 0 + Math.abs(costArray[1] - costArray[0]) + Math.abs(costArray[2] - costArray[1]) 0 + Math.abs(costArray[1] - costArray[0]) + Math.abs(costArray[2] - costArray[1]) 0 Math.abs(costArray[1] - costArray[0]) Math.abs Math costArray[1] - costArray[0] costArray[1] costArray 1 costArray[0] costArray 0 Math.abs(costArray[2] - costArray[1]) Math.abs Math costArray[2] - costArray[1] costArray[2] costArray 2 costArray[1] costArray 1 System.out.println(ans) System.out.println System.out System System.out ans scanner.close() scanner.close scanner String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int[] costArray = { scanner.nextInt(), scanner.nextInt(), scanner.nextInt() };
		Arrays.sort(costArray);
		int ans = 0 + Math.abs(costArray[1] - costArray[0]) + Math.abs(costArray[2] - costArray[1]);
		System.out.println(ans);
		scanner.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int[] costArray = { scanner.nextInt(), scanner.nextInt(), scanner.nextInt() };
		Arrays.sort(costArray);
		int ans = 0 + Math.abs(costArray[1] - costArray[0]) + Math.abs(costArray[2] - costArray[1]);
		System.out.println(ans);
		scanner.close();
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int[] costArray = { scanner.nextInt(), scanner.nextInt(), scanner.nextInt() };
		Arrays.sort(costArray);
		int ans = 0 + Math.abs(costArray[1] - costArray[0]) + Math.abs(costArray[2] - costArray[1]);
		System.out.println(ans);
		scanner.close();
	}
}