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

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] A = new int[3];
		for (int i = 0; i < 3; i++) {
			A[i] = sc.nextInt();
		}

		Arrays.sort(A);

		int sum = 0;
		for (int i = 1; i < A.length; i++) {
			sum += A[i] - A[i - 1];
		}

		System.out.println(sum);
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] A = new int[3];
		for (int i = 0; i < 3; i++) {
			A[i] = sc.nextInt();
		}

		Arrays.sort(A);

		int sum = 0;
		for (int i = 1; i < A.length; i++) {
			sum += A[i] - A[i - 1];
		}

		System.out.println(sum);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] A = new int[3];
		for (int i = 0; i < 3; i++) {
			A[i] = sc.nextInt();
		}

		Arrays.sort(A);

		int sum = 0;
		for (int i = 1; i < A.length; i++) {
			sum += A[i] - A[i - 1];
		}

		System.out.println(sum);
	} main {
		Scanner sc = new Scanner(System.in);
		int[] A = new int[3];
		for (int i = 0; i < 3; i++) {
			A[i] = sc.nextInt();
		}

		Arrays.sort(A);

		int sum = 0;
		for (int i = 1; i < A.length; i++) {
			sum += A[i] - A[i - 1];
		}

		System.out.println(sum);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] A = new int[3]; A new int[3] 3 for (int i = 0; i < 3; i++) {
			A[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
			A[i] = sc.nextInt();
		} {
			A[i] = sc.nextInt();
		} A[i] = sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc Arrays.sort(A) Arrays.sort Arrays A int sum = 0; sum 0 for (int i = 1; i < A.length; i++) {
			sum += A[i] - A[i - 1];
		} int i = 1; int i = 1; i 1 i < A.length i A.length A A.length i++ i++ i {
			sum += A[i] - A[i - 1];
		} {
			sum += A[i] - A[i - 1];
		} sum += A[i] - A[i - 1] sum A[i] - A[i - 1] A[i] A i A[i - 1] A i - 1 i 1 System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] A = new int[3];
		for (int i = 0; i < 3; i++) {
			A[i] = sc.nextInt();
		}

		Arrays.sort(A);

		int sum = 0;
		for (int i = 1; i < A.length; i++) {
			sum += A[i] - A[i - 1];
		}

		System.out.println(sum);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] A = new int[3];
		for (int i = 0; i < 3; i++) {
			A[i] = sc.nextInt();
		}

		Arrays.sort(A);

		int sum = 0;
		for (int i = 1; i < A.length; i++) {
			sum += A[i] - A[i - 1];
		}

		System.out.println(sum);
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] A = new int[3];
		for (int i = 0; i < 3; i++) {
			A[i] = sc.nextInt();
		}

		Arrays.sort(A);

		int sum = 0;
		for (int i = 1; i < A.length; i++) {
			sum += A[i] - A[i - 1];
		}

		System.out.println(sum);
	}
}