import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        int[] A = new int[3];
        Scanner scan = new Scanner(System.in);
        A[0] = Integer.parseInt(scan.next());
        A[1] = Integer.parseInt(scan.next());
        A[2] = Integer.parseInt(scan.next());

        int tmpmin = 101;
        int nummin=0;
        int tmpmax = 0;
        int nummax=0;
        int num=0;
        for(int i = 0;i<3;i++){
            if(tmpmin>=A[i]){
                tmpmin = A[i];
                nummin = i;
            }
            if(tmpmax<A[i]){
                tmpmax=A[i];
                nummax = i;
            }
            if(i!=nummin && i !=nummax){
                num = i;
            }
        }
        int cost = 0;
        cost += A[num]-A[nummin];
        cost+= A[nummax]-A[num];
        System.out.println(cost);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        int[] A = new int[3];
        Scanner scan = new Scanner(System.in);
        A[0] = Integer.parseInt(scan.next());
        A[1] = Integer.parseInt(scan.next());
        A[2] = Integer.parseInt(scan.next());

        int tmpmin = 101;
        int nummin=0;
        int tmpmax = 0;
        int nummax=0;
        int num=0;
        for(int i = 0;i<3;i++){
            if(tmpmin>=A[i]){
                tmpmin = A[i];
                nummin = i;
            }
            if(tmpmax<A[i]){
                tmpmax=A[i];
                nummax = i;
            }
            if(i!=nummin && i !=nummax){
                num = i;
            }
        }
        int cost = 0;
        cost += A[num]-A[nummin];
        cost+= A[nummax]-A[num];
        System.out.println(cost);
    }
} Main public static void main(String[] args) {
        int[] A = new int[3];
        Scanner scan = new Scanner(System.in);
        A[0] = Integer.parseInt(scan.next());
        A[1] = Integer.parseInt(scan.next());
        A[2] = Integer.parseInt(scan.next());

        int tmpmin = 101;
        int nummin=0;
        int tmpmax = 0;
        int nummax=0;
        int num=0;
        for(int i = 0;i<3;i++){
            if(tmpmin>=A[i]){
                tmpmin = A[i];
                nummin = i;
            }
            if(tmpmax<A[i]){
                tmpmax=A[i];
                nummax = i;
            }
            if(i!=nummin && i !=nummax){
                num = i;
            }
        }
        int cost = 0;
        cost += A[num]-A[nummin];
        cost+= A[nummax]-A[num];
        System.out.println(cost);
    } main {
        int[] A = new int[3];
        Scanner scan = new Scanner(System.in);
        A[0] = Integer.parseInt(scan.next());
        A[1] = Integer.parseInt(scan.next());
        A[2] = Integer.parseInt(scan.next());

        int tmpmin = 101;
        int nummin=0;
        int tmpmax = 0;
        int nummax=0;
        int num=0;
        for(int i = 0;i<3;i++){
            if(tmpmin>=A[i]){
                tmpmin = A[i];
                nummin = i;
            }
            if(tmpmax<A[i]){
                tmpmax=A[i];
                nummax = i;
            }
            if(i!=nummin && i !=nummax){
                num = i;
            }
        }
        int cost = 0;
        cost += A[num]-A[nummin];
        cost+= A[nummax]-A[num];
        System.out.println(cost);
    } int[] A = new int[3]; A new int[3] 3 Scanner scan = new Scanner(System.in); scan new Scanner(System.in) A[0] = Integer.parseInt(scan.next()) A[0] A 0 Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan A[1] = Integer.parseInt(scan.next()) A[1] A 1 Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan A[2] = Integer.parseInt(scan.next()) A[2] A 2 Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int tmpmin = 101; tmpmin 101 int nummin=0; nummin 0 int tmpmax = 0; tmpmax 0 int nummax=0; nummax 0 int num=0; num 0 for(int i = 0;i<3;i++){
            if(tmpmin>=A[i]){
                tmpmin = A[i];
                nummin = i;
            }
            if(tmpmax<A[i]){
                tmpmax=A[i];
                nummax = i;
            }
            if(i!=nummin && i !=nummax){
                num = i;
            }
        } int i = 0; int i = 0; i 0 i<3 i 3 i++ i++ i {
            if(tmpmin>=A[i]){
                tmpmin = A[i];
                nummin = i;
            }
            if(tmpmax<A[i]){
                tmpmax=A[i];
                nummax = i;
            }
            if(i!=nummin && i !=nummax){
                num = i;
            }
        } {
            if(tmpmin>=A[i]){
                tmpmin = A[i];
                nummin = i;
            }
            if(tmpmax<A[i]){
                tmpmax=A[i];
                nummax = i;
            }
            if(i!=nummin && i !=nummax){
                num = i;
            }
        } if(tmpmin>=A[i]){
                tmpmin = A[i];
                nummin = i;
            } tmpmin>=A[i] tmpmin A[i] A i {
                tmpmin = A[i];
                nummin = i;
            } tmpmin = A[i] tmpmin A[i] A i nummin = i nummin i if(tmpmax<A[i]){
                tmpmax=A[i];
                nummax = i;
            } tmpmax<A[i] tmpmax A[i] A i {
                tmpmax=A[i];
                nummax = i;
            } tmpmax=A[i] tmpmax A[i] A i nummax = i nummax i if(i!=nummin && i !=nummax){
                num = i;
            } i!=nummin && i !=nummax i!=nummin i nummin i !=nummax i nummax {
                num = i;
            } num = i num i int cost = 0; cost 0 cost += A[num]-A[nummin] cost A[num]-A[nummin] A[num] A num A[nummin] A nummin cost+= A[nummax]-A[num] cost A[nummax]-A[num] A[nummax] A nummax A[num] A num System.out.println(cost) System.out.println System.out System System.out cost String[] args args public class Main {
    public static void main(String[] args) {
        int[] A = new int[3];
        Scanner scan = new Scanner(System.in);
        A[0] = Integer.parseInt(scan.next());
        A[1] = Integer.parseInt(scan.next());
        A[2] = Integer.parseInt(scan.next());

        int tmpmin = 101;
        int nummin=0;
        int tmpmax = 0;
        int nummax=0;
        int num=0;
        for(int i = 0;i<3;i++){
            if(tmpmin>=A[i]){
                tmpmin = A[i];
                nummin = i;
            }
            if(tmpmax<A[i]){
                tmpmax=A[i];
                nummax = i;
            }
            if(i!=nummin && i !=nummax){
                num = i;
            }
        }
        int cost = 0;
        cost += A[num]-A[nummin];
        cost+= A[nummax]-A[num];
        System.out.println(cost);
    }
} public class Main {
    public static void main(String[] args) {
        int[] A = new int[3];
        Scanner scan = new Scanner(System.in);
        A[0] = Integer.parseInt(scan.next());
        A[1] = Integer.parseInt(scan.next());
        A[2] = Integer.parseInt(scan.next());

        int tmpmin = 101;
        int nummin=0;
        int tmpmax = 0;
        int nummax=0;
        int num=0;
        for(int i = 0;i<3;i++){
            if(tmpmin>=A[i]){
                tmpmin = A[i];
                nummin = i;
            }
            if(tmpmax<A[i]){
                tmpmax=A[i];
                nummax = i;
            }
            if(i!=nummin && i !=nummax){
                num = i;
            }
        }
        int cost = 0;
        cost += A[num]-A[nummin];
        cost+= A[nummax]-A[num];
        System.out.println(cost);
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        int[] A = new int[3];
        Scanner scan = new Scanner(System.in);
        A[0] = Integer.parseInt(scan.next());
        A[1] = Integer.parseInt(scan.next());
        A[2] = Integer.parseInt(scan.next());

        int tmpmin = 101;
        int nummin=0;
        int tmpmax = 0;
        int nummax=0;
        int num=0;
        for(int i = 0;i<3;i++){
            if(tmpmin>=A[i]){
                tmpmin = A[i];
                nummin = i;
            }
            if(tmpmax<A[i]){
                tmpmax=A[i];
                nummax = i;
            }
            if(i!=nummin && i !=nummax){
                num = i;
            }
        }
        int cost = 0;
        cost += A[num]-A[nummin];
        cost+= A[nummax]-A[num];
        System.out.println(cost);
    }
}