// package app;

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

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

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

        // int A1 = sc.nextInt();
        Arrays.sort(arr);

        System.out.println(Math.abs(arr[1] - arr[0]) + Math.abs(arr[2] - arr[1]));
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);

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

        // int A1 = sc.nextInt();
        Arrays.sort(arr);

        System.out.println(Math.abs(arr[1] - arr[0]) + Math.abs(arr[2] - arr[1]));
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);

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

        // int A1 = sc.nextInt();
        Arrays.sort(arr);

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

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

        // int A1 = sc.nextInt();
        Arrays.sort(arr);

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

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

        // int A1 = sc.nextInt();
        Arrays.sort(arr);

        System.out.println(Math.abs(arr[1] - arr[0]) + Math.abs(arr[2] - arr[1]));
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);

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

        // int A1 = sc.nextInt();
        Arrays.sort(arr);

        System.out.println(Math.abs(arr[1] - arr[0]) + Math.abs(arr[2] - arr[1]));
    }
} Main
// package app;

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

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

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

        // int A1 = sc.nextInt();
        Arrays.sort(arr);

        System.out.println(Math.abs(arr[1] - arr[0]) + Math.abs(arr[2] - arr[1]));
    }
}