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

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int[] tasks = new int[3];
        for (int i = 0; i < 3; i++) {
            tasks[i] = sc.nextInt();
        }

        Arrays.sort(tasks);
        int min = Math.abs(tasks[0] - tasks[1]) + Math.abs(tasks[1] - tasks[2]);
        System.out.println(min);
    }
} 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[] tasks = new int[3];
        for (int i = 0; i < 3; i++) {
            tasks[i] = sc.nextInt();
        }

        Arrays.sort(tasks);
        int min = Math.abs(tasks[0] - tasks[1]) + Math.abs(tasks[1] - tasks[2]);
        System.out.println(min);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int[] tasks = new int[3];
        for (int i = 0; i < 3; i++) {
            tasks[i] = sc.nextInt();
        }

        Arrays.sort(tasks);
        int min = Math.abs(tasks[0] - tasks[1]) + Math.abs(tasks[1] - tasks[2]);
        System.out.println(min);
    } main {
        Scanner sc = new Scanner(System.in);

        int[] tasks = new int[3];
        for (int i = 0; i < 3; i++) {
            tasks[i] = sc.nextInt();
        }

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

        int[] tasks = new int[3];
        for (int i = 0; i < 3; i++) {
            tasks[i] = sc.nextInt();
        }

        Arrays.sort(tasks);
        int min = Math.abs(tasks[0] - tasks[1]) + Math.abs(tasks[1] - tasks[2]);
        System.out.println(min);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int[] tasks = new int[3];
        for (int i = 0; i < 3; i++) {
            tasks[i] = sc.nextInt();
        }

        Arrays.sort(tasks);
        int min = Math.abs(tasks[0] - tasks[1]) + Math.abs(tasks[1] - tasks[2]);
        System.out.println(min);
    }
} 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[] tasks = new int[3];
        for (int i = 0; i < 3; i++) {
            tasks[i] = sc.nextInt();
        }

        Arrays.sort(tasks);
        int min = Math.abs(tasks[0] - tasks[1]) + Math.abs(tasks[1] - tasks[2]);
        System.out.println(min);
    }
}
