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

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] arr = new int[3];
        for (int i = 0; i < arr.length; i++)
            arr[i] = sc.nextInt();
        Arrays.sort(arr);
        System.out.println((arr[2] - arr[1]) + (arr[1] - arr[0]));
    }
} 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[] arr = new int[3];
        for (int i = 0; i < arr.length; i++)
            arr[i] = sc.nextInt();
        Arrays.sort(arr);
        System.out.println((arr[2] - arr[1]) + (arr[1] - arr[0]));
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] arr = new int[3];
        for (int i = 0; i < arr.length; i++)
            arr[i] = sc.nextInt();
        Arrays.sort(arr);
        System.out.println((arr[2] - arr[1]) + (arr[1] - arr[0]));
    } main {
        Scanner sc = new Scanner(System.in);
        int[] arr = new int[3];
        for (int i = 0; i < arr.length; i++)
            arr[i] = sc.nextInt();
        Arrays.sort(arr);
        System.out.println((arr[2] - arr[1]) + (arr[1] - arr[0]));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] arr = new int[3]; arr new int[3] 3 for (int i = 0; i < arr.length; i++)
            arr[i] = sc.nextInt(); int i = 0; int i = 0; i 0 i < arr.length i arr.length arr arr.length i++ i++ i arr[i] = sc.nextInt(); arr[i] = sc.nextInt() arr[i] arr i sc.nextInt() sc.nextInt sc Arrays.sort(arr) Arrays.sort Arrays arr System.out.println((arr[2] - arr[1]) + (arr[1] - arr[0])) System.out.println System.out System System.out (arr[2] - arr[1]) + (arr[1] - arr[0]) (arr[2] - arr[1]) arr[2] arr 2 arr[1] arr 1 (arr[1] - arr[0]) arr[1] arr 1 arr[0] arr 0 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] arr = new int[3];
        for (int i = 0; i < arr.length; i++)
            arr[i] = sc.nextInt();
        Arrays.sort(arr);
        System.out.println((arr[2] - arr[1]) + (arr[1] - arr[0]));
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] arr = new int[3];
        for (int i = 0; i < arr.length; i++)
            arr[i] = sc.nextInt();
        Arrays.sort(arr);
        System.out.println((arr[2] - arr[1]) + (arr[1] - arr[0]));
    }
} 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[] arr = new int[3];
        for (int i = 0; i < arr.length; i++)
            arr[i] = sc.nextInt();
        Arrays.sort(arr);
        System.out.println((arr[2] - arr[1]) + (arr[1] - arr[0]));
    }
}
