import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int[] val = new int[3];
        for (int x = 0; x < 3; x++) val[x] = scanner.nextInt();
        int sum = 0;
        Arrays.sort(val);
        for(int y = 1; y<3; y++){
            sum = sum+ Math.abs(val[y]-val[y-1]);
        }
        System.out.println(sum);

    }

} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int[] val = new int[3];
        for (int x = 0; x < 3; x++) val[x] = scanner.nextInt();
        int sum = 0;
        Arrays.sort(val);
        for(int y = 1; y<3; y++){
            sum = sum+ Math.abs(val[y]-val[y-1]);
        }
        System.out.println(sum);

    }

} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int[] val = new int[3];
        for (int x = 0; x < 3; x++) val[x] = scanner.nextInt();
        int sum = 0;
        Arrays.sort(val);
        for(int y = 1; y<3; y++){
            sum = sum+ Math.abs(val[y]-val[y-1]);
        }
        System.out.println(sum);

    } main {
        Scanner scanner = new Scanner(System.in);
        int[] val = new int[3];
        for (int x = 0; x < 3; x++) val[x] = scanner.nextInt();
        int sum = 0;
        Arrays.sort(val);
        for(int y = 1; y<3; y++){
            sum = sum+ Math.abs(val[y]-val[y-1]);
        }
        System.out.println(sum);

    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int[] val = new int[3]; val new int[3] 3 for (int x = 0; x < 3; x++) val[x] = scanner.nextInt(); int x = 0; int x = 0; x 0 x < 3 x 3 x++ x++ x val[x] = scanner.nextInt(); val[x] = scanner.nextInt() val[x] val x scanner.nextInt() scanner.nextInt scanner int sum = 0; sum 0 Arrays.sort(val) Arrays.sort Arrays val for(int y = 1; y<3; y++){
            sum = sum+ Math.abs(val[y]-val[y-1]);
        } int y = 1; int y = 1; y 1 y<3 y 3 y++ y++ y {
            sum = sum+ Math.abs(val[y]-val[y-1]);
        } {
            sum = sum+ Math.abs(val[y]-val[y-1]);
        } sum = sum+ Math.abs(val[y]-val[y-1]) sum sum+ Math.abs(val[y]-val[y-1]) sum Math.abs(val[y]-val[y-1]) Math.abs Math val[y]-val[y-1] val[y] val y val[y-1] val y-1 y 1 System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int[] val = new int[3];
        for (int x = 0; x < 3; x++) val[x] = scanner.nextInt();
        int sum = 0;
        Arrays.sort(val);
        for(int y = 1; y<3; y++){
            sum = sum+ Math.abs(val[y]-val[y-1]);
        }
        System.out.println(sum);

    }

} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int[] val = new int[3];
        for (int x = 0; x < 3; x++) val[x] = scanner.nextInt();
        int sum = 0;
        Arrays.sort(val);
        for(int y = 1; y<3; y++){
            sum = sum+ Math.abs(val[y]-val[y-1]);
        }
        System.out.println(sum);

    }

} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int[] val = new int[3];
        for (int x = 0; x < 3; x++) val[x] = scanner.nextInt();
        int sum = 0;
        Arrays.sort(val);
        for(int y = 1; y<3; y++){
            sum = sum+ Math.abs(val[y]-val[y-1]);
        }
        System.out.println(sum);

    }

}
