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

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int result =0;
		int A[] = new int[3];
		for (int i=0;i<3;i++) {
			A[i] = sc.nextInt();
		}
		Arrays.sort(A);
		result +=Math.abs(A[1]-A[0]);
		result +=Math.abs(A[1]-A[2]);
		System.out.println(result);
	}
} 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 result =0;
		int A[] = new int[3];
		for (int i=0;i<3;i++) {
			A[i] = sc.nextInt();
		}
		Arrays.sort(A);
		result +=Math.abs(A[1]-A[0]);
		result +=Math.abs(A[1]-A[2]);
		System.out.println(result);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int result =0;
		int A[] = new int[3];
		for (int i=0;i<3;i++) {
			A[i] = sc.nextInt();
		}
		Arrays.sort(A);
		result +=Math.abs(A[1]-A[0]);
		result +=Math.abs(A[1]-A[2]);
		System.out.println(result);
	} main {
		Scanner sc = new Scanner(System.in);
		int result =0;
		int A[] = new int[3];
		for (int i=0;i<3;i++) {
			A[i] = sc.nextInt();
		}
		Arrays.sort(A);
		result +=Math.abs(A[1]-A[0]);
		result +=Math.abs(A[1]-A[2]);
		System.out.println(result);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int result =0; result 0 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 result +=Math.abs(A[1]-A[0]) result Math.abs(A[1]-A[0]) Math.abs Math A[1]-A[0] A[1] A 1 A[0] A 0 result +=Math.abs(A[1]-A[2]) result Math.abs(A[1]-A[2]) Math.abs Math A[1]-A[2] A[1] A 1 A[2] A 2 System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int result =0;
		int A[] = new int[3];
		for (int i=0;i<3;i++) {
			A[i] = sc.nextInt();
		}
		Arrays.sort(A);
		result +=Math.abs(A[1]-A[0]);
		result +=Math.abs(A[1]-A[2]);
		System.out.println(result);
	}
} 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 result =0;
		int A[] = new int[3];
		for (int i=0;i<3;i++) {
			A[i] = sc.nextInt();
		}
		Arrays.sort(A);
		result +=Math.abs(A[1]-A[0]);
		result +=Math.abs(A[1]-A[2]);
		System.out.println(result);
	}
}