import java.util.*;

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

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