

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;

public final class Main {

    public static void main(String[] args) {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int n = 3;
        final int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }
        in.nextLine();
        Arrays.sort(arr);
        int res = 0;
        for (int i = 0; i < n - 1; i++) {
            res += arr[i + 1] - arr[i];
        }
        System.out.println(res);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public final class Main {

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

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

    public static void main(String[] args) {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int n = 3;
        final int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }
        in.nextLine();
        Arrays.sort(arr);
        int res = 0;
        for (int i = 0; i < n - 1; i++) {
            res += arr[i + 1] - arr[i];
        }
        System.out.println(res);
    }
} Main


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;

public final class Main {

    public static void main(String[] args) {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int n = 3;
        final int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }
        in.nextLine();
        Arrays.sort(arr);
        int res = 0;
        for (int i = 0; i < n - 1; i++) {
            res += arr[i + 1] - arr[i];
        }
        System.out.println(res);
    }
}
