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

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

        int a1 = sc.nextInt();
        int a2 = sc.nextInt();
        int a3 = sc.nextInt();

        int[] diff = new int[3];
        diff[0] = Math.abs(a1 - a2);
        diff[1] = Math.abs(a2 - a3);
        diff[2] = Math.abs(a3 - a1);

        Arrays.sort(diff);
        System.out.println(diff[0] + diff[1]);
    }
} 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 a1 = sc.nextInt();
        int a2 = sc.nextInt();
        int a3 = sc.nextInt();

        int[] diff = new int[3];
        diff[0] = Math.abs(a1 - a2);
        diff[1] = Math.abs(a2 - a3);
        diff[2] = Math.abs(a3 - a1);

        Arrays.sort(diff);
        System.out.println(diff[0] + diff[1]);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a1 = sc.nextInt();
        int a2 = sc.nextInt();
        int a3 = sc.nextInt();

        int[] diff = new int[3];
        diff[0] = Math.abs(a1 - a2);
        diff[1] = Math.abs(a2 - a3);
        diff[2] = Math.abs(a3 - a1);

        Arrays.sort(diff);
        System.out.println(diff[0] + diff[1]);
    } main {
        Scanner sc = new Scanner(System.in);

        int a1 = sc.nextInt();
        int a2 = sc.nextInt();
        int a3 = sc.nextInt();

        int[] diff = new int[3];
        diff[0] = Math.abs(a1 - a2);
        diff[1] = Math.abs(a2 - a3);
        diff[2] = Math.abs(a3 - a1);

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

        int a1 = sc.nextInt();
        int a2 = sc.nextInt();
        int a3 = sc.nextInt();

        int[] diff = new int[3];
        diff[0] = Math.abs(a1 - a2);
        diff[1] = Math.abs(a2 - a3);
        diff[2] = Math.abs(a3 - a1);

        Arrays.sort(diff);
        System.out.println(diff[0] + diff[1]);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a1 = sc.nextInt();
        int a2 = sc.nextInt();
        int a3 = sc.nextInt();

        int[] diff = new int[3];
        diff[0] = Math.abs(a1 - a2);
        diff[1] = Math.abs(a2 - a3);
        diff[2] = Math.abs(a3 - a1);

        Arrays.sort(diff);
        System.out.println(diff[0] + diff[1]);
    }
} 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 a1 = sc.nextInt();
        int a2 = sc.nextInt();
        int a3 = sc.nextInt();

        int[] diff = new int[3];
        diff[0] = Math.abs(a1 - a2);
        diff[1] = Math.abs(a2 - a3);
        diff[2] = Math.abs(a3 - a1);

        Arrays.sort(diff);
        System.out.println(diff[0] + diff[1]);
    }
}
