import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a =sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int[] arr = new int[3];
        arr[0] = a; arr[1] = b; arr[2] = c;
        Arrays.sort(arr);
        //int ans = arr[2];
        //ans += (arr[2] - arr[1]);
        //ans += (arr[1] - arr[0]);
        int ans = 0;
        ans += (arr[1] - arr[0]);
        ans += (arr[2] - arr[1]);
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a =sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int[] arr = new int[3];
        arr[0] = a; arr[1] = b; arr[2] = c;
        Arrays.sort(arr);
        //int ans = arr[2];
        //ans += (arr[2] - arr[1]);
        //ans += (arr[1] - arr[0]);
        int ans = 0;
        ans += (arr[1] - arr[0]);
        ans += (arr[2] - arr[1]);
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a =sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int[] arr = new int[3];
        arr[0] = a; arr[1] = b; arr[2] = c;
        Arrays.sort(arr);
        //int ans = arr[2];
        //ans += (arr[2] - arr[1]);
        //ans += (arr[1] - arr[0]);
        int ans = 0;
        ans += (arr[1] - arr[0]);
        ans += (arr[2] - arr[1]);
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int a =sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int[] arr = new int[3];
        arr[0] = a; arr[1] = b; arr[2] = c;
        Arrays.sort(arr);
        //int ans = arr[2];
        //ans += (arr[2] - arr[1]);
        //ans += (arr[1] - arr[0]);
        int ans = 0;
        ans += (arr[1] - arr[0]);
        ans += (arr[2] - arr[1]);
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a =sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int[] arr = new int[3]; arr new int[3] 3 arr[0] = a arr[0] arr 0 a arr[1] = b arr[1] arr 1 b arr[2] = c arr[2] arr 2 c Arrays.sort(arr) Arrays.sort Arrays arr int ans = 0; ans 0 ans += (arr[1] - arr[0]) ans (arr[1] - arr[0]) arr[1] arr 1 arr[0] arr 0 ans += (arr[2] - arr[1]) ans (arr[2] - arr[1]) arr[2] arr 2 arr[1] arr 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 sc = new Scanner(System.in);
        int a =sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int[] arr = new int[3];
        arr[0] = a; arr[1] = b; arr[2] = c;
        Arrays.sort(arr);
        //int ans = arr[2];
        //ans += (arr[2] - arr[1]);
        //ans += (arr[1] - arr[0]);
        int ans = 0;
        ans += (arr[1] - arr[0]);
        ans += (arr[2] - arr[1]);
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a =sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int[] arr = new int[3];
        arr[0] = a; arr[1] = b; arr[2] = c;
        Arrays.sort(arr);
        //int ans = arr[2];
        //ans += (arr[2] - arr[1]);
        //ans += (arr[1] - arr[0]);
        int ans = 0;
        ans += (arr[1] - arr[0]);
        ans += (arr[2] - arr[1]);
        System.out.println(ans);
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a =sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int[] arr = new int[3];
        arr[0] = a; arr[1] = b; arr[2] = c;
        Arrays.sort(arr);
        //int ans = arr[2];
        //ans += (arr[2] - arr[1]);
        //ans += (arr[1] - arr[0]);
        int ans = 0;
        ans += (arr[1] - arr[0]);
        ans += (arr[2] - arr[1]);
        System.out.println(ans);
    }
}