import java.util.*;
class Main{
    public static void main(String[] args){
	Scanner stdIn=new Scanner(System.in);
	int[] S = new int[3];
	for(int i=0;i<3;i++){
	    S[i] = stdIn.nextInt();
	}
	Arrays.sort(S);
	int j =S[2]-S[1];
	int k =S[1]-S[0];
	System.out.println(j+k);
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
	Scanner stdIn=new Scanner(System.in);
	int[] S = new int[3];
	for(int i=0;i<3;i++){
	    S[i] = stdIn.nextInt();
	}
	Arrays.sort(S);
	int j =S[2]-S[1];
	int k =S[1]-S[0];
	System.out.println(j+k);
    }
} Main public static void main(String[] args){
	Scanner stdIn=new Scanner(System.in);
	int[] S = new int[3];
	for(int i=0;i<3;i++){
	    S[i] = stdIn.nextInt();
	}
	Arrays.sort(S);
	int j =S[2]-S[1];
	int k =S[1]-S[0];
	System.out.println(j+k);
    } main {
	Scanner stdIn=new Scanner(System.in);
	int[] S = new int[3];
	for(int i=0;i<3;i++){
	    S[i] = stdIn.nextInt();
	}
	Arrays.sort(S);
	int j =S[2]-S[1];
	int k =S[1]-S[0];
	System.out.println(j+k);
    } Scanner stdIn=new Scanner(System.in); stdIn new Scanner(System.in) int[] S = new int[3]; S new int[3] 3 for(int i=0;i<3;i++){
	    S[i] = stdIn.nextInt();
	} int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
	    S[i] = stdIn.nextInt();
	} {
	    S[i] = stdIn.nextInt();
	} S[i] = stdIn.nextInt() S[i] S i stdIn.nextInt() stdIn.nextInt stdIn Arrays.sort(S) Arrays.sort Arrays S int j =S[2]-S[1]; j S[2]-S[1] S[2] S 2 S[1] S 1 int k =S[1]-S[0]; k S[1]-S[0] S[1] S 1 S[0] S 0 System.out.println(j+k) System.out.println System.out System System.out j+k j k String[] args args
import java.util.*;
class Main{
    public static void main(String[] args){
	Scanner stdIn=new Scanner(System.in);
	int[] S = new int[3];
	for(int i=0;i<3;i++){
	    S[i] = stdIn.nextInt();
	}
	Arrays.sort(S);
	int j =S[2]-S[1];
	int k =S[1]-S[0];
	System.out.println(j+k);
    }
}
