import java.util.*;
import java.io.*;

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

        System.out.println(ans);
    }


} import java.util.*; util.* java import java.io.*; io.* java public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int[] arr = new int[3];
        for (int i = 0; i < 3; ++i) {
            arr[i] = in.nextInt();
        } Arrays.sort(arr);
        int ans = 0;
        for (int i = 1; i < 3; ++i) {
            ans += Math.abs(arr[i] - arr[i - 1]);
        }

        System.out.println(ans);
    }


} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int[] arr = new int[3];
        for (int i = 0; i < 3; ++i) {
            arr[i] = in.nextInt();
        } Arrays.sort(arr);
        int ans = 0;
        for (int i = 1; i < 3; ++i) {
            ans += Math.abs(arr[i] - arr[i - 1]);
        }

        System.out.println(ans);
    } main {
        Scanner in = new Scanner(System.in);
        int[] arr = new int[3];
        for (int i = 0; i < 3; ++i) {
            arr[i] = in.nextInt();
        } Arrays.sort(arr);
        int ans = 0;
        for (int i = 1; i < 3; ++i) {
            ans += Math.abs(arr[i] - arr[i - 1]);
        }

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

        System.out.println(ans);
    }


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

        System.out.println(ans);
    }


} Main
import java.util.*;
import java.io.*;

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

        System.out.println(ans);
    }


}