import java.util.*;
public class Main {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	
	int i;		
	int diff1,diff2,result;

	Integer[] Input = new Integer[3];
	
	for(i=0;i<3;i++) {
		Input[i] = sc.nextInt();
	}
	
	Arrays.sort(Input);
	
	
	diff1 = Input[1] - Input[0];
	diff2 = Input[2] - Input[1];
	result = diff1 + diff2;
	
	
	System.out.println(result);
	
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	
	int i;		
	int diff1,diff2,result;

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

	Integer[] Input = new Integer[3];
	
	for(i=0;i<3;i++) {
		Input[i] = sc.nextInt();
	}
	
	Arrays.sort(Input);
	
	
	diff1 = Input[1] - Input[0];
	diff2 = Input[2] - Input[1];
	result = diff1 + diff2;
	
	
	System.out.println(result);
	
	} main {
	Scanner sc = new Scanner(System.in);
	
	int i;		
	int diff1,diff2,result;

	Integer[] Input = new Integer[3];
	
	for(i=0;i<3;i++) {
		Input[i] = sc.nextInt();
	}
	
	Arrays.sort(Input);
	
	
	diff1 = Input[1] - Input[0];
	diff2 = Input[2] - Input[1];
	result = diff1 + diff2;
	
	
	System.out.println(result);
	
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int i; i int diff1 diff1 diff2 diff2 result; result Integer[] Input = new Integer[3]; Input new Integer[3] 3 for(i=0;i<3;i++) {
		Input[i] = sc.nextInt();
	} i=0; i=0 i 0 i<3 i 3 i++ i++ i {
		Input[i] = sc.nextInt();
	} {
		Input[i] = sc.nextInt();
	} Input[i] = sc.nextInt() Input[i] Input i sc.nextInt() sc.nextInt sc Arrays.sort(Input) Arrays.sort Arrays Input diff1 = Input[1] - Input[0] diff1 Input[1] - Input[0] Input[1] Input 1 Input[0] Input 0 diff2 = Input[2] - Input[1] diff2 Input[2] - Input[1] Input[2] Input 2 Input[1] Input 1 result = diff1 + diff2 result diff1 + diff2 diff1 diff2 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 i;		
	int diff1,diff2,result;

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

	Integer[] Input = new Integer[3];
	
	for(i=0;i<3;i++) {
		Input[i] = sc.nextInt();
	}
	
	Arrays.sort(Input);
	
	
	diff1 = Input[1] - Input[0];
	diff2 = Input[2] - Input[1];
	result = diff1 + diff2;
	
	
	System.out.println(result);
	
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	
	int i;		
	int diff1,diff2,result;

	Integer[] Input = new Integer[3];
	
	for(i=0;i<3;i++) {
		Input[i] = sc.nextInt();
	}
	
	Arrays.sort(Input);
	
	
	diff1 = Input[1] - Input[0];
	diff2 = Input[2] - Input[1];
	result = diff1 + diff2;
	
	
	System.out.println(result);
	
	}
}
