import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int [] array = new int[3];
        for(int i = 0; i < 3; i++)
            array[i] = scan.nextInt();

        Arrays.sort(array);

        int sum = 0;
        for( int i = 1; i < 3; i++){
            sum += array[i] - array[i-1];
        }
        System.out.println(sum);
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int [] array = new int[3];
        for(int i = 0; i < 3; i++)
            array[i] = scan.nextInt();

        Arrays.sort(array);

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

        Arrays.sort(array);

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

        Arrays.sort(array);

        int sum = 0;
        for( int i = 1; i < 3; i++){
            sum += array[i] - array[i-1];
        }
        System.out.println(sum);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int [] array = new int[3]; array new int[3] 3 for(int i = 0; i < 3; i++)
            array[i] = scan.nextInt(); int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i array[i] = scan.nextInt(); array[i] = scan.nextInt() array[i] array i scan.nextInt() scan.nextInt scan Arrays.sort(array) Arrays.sort Arrays array int sum = 0; sum 0 for( int i = 1; i < 3; i++){
            sum += array[i] - array[i-1];
        } int i = 1; int i = 1; i 1 i < 3 i 3 i++ i++ i {
            sum += array[i] - array[i-1];
        } {
            sum += array[i] - array[i-1];
        } sum += array[i] - array[i-1] sum array[i] - array[i-1] array[i] array i array[i-1] array i-1 i 1 System.out.println(sum) System.out.println System.out System System.out sum String[] args args
import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int [] array = new int[3];
        for(int i = 0; i < 3; i++)
            array[i] = scan.nextInt();

        Arrays.sort(array);

        int sum = 0;
        for( int i = 1; i < 3; i++){
            sum += array[i] - array[i-1];
        }
        System.out.println(sum);
    }
}
