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

public class Main {

	public static void main(String ars[]) {

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int sum = 0;

		int[] A = {a,b,c};

		Arrays.sort(A);

		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 ars[]) {

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int sum = 0;

		int[] A = {a,b,c};

		Arrays.sort(A);

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

		System.out.println(sum);

	}

} Main public static void main(String ars[]) {

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int sum = 0;

		int[] A = {a,b,c};

		Arrays.sort(A);

		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 = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int sum = 0;

		int[] A = {a,b,c};

		Arrays.sort(A);

		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 = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int sum = 0; sum 0 int[] A = {a,b,c}; A {a,b,c} a b c Arrays.sort(A) Arrays.sort Arrays A 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 ars[] ars public class Main {

	public static void main(String ars[]) {

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int sum = 0;

		int[] A = {a,b,c};

		Arrays.sort(A);

		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 ars[]) {

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int sum = 0;

		int[] A = {a,b,c};

		Arrays.sort(A);

		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 ars[]) {

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int sum = 0;

		int[] A = {a,b,c};

		Arrays.sort(A);

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

		System.out.println(sum);

	}

}
