import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a1 = Integer.parseInt(sc.next());
        int a2 = Integer.parseInt(sc.next());
        int a3 = Integer.parseInt(sc.next());

        // 主処理
        int[] a = new int[] { a1, a2, a3 };
        Arrays.sort(a);

        int result = 0;
        result += a[1] - a[0];
        result += a[2] - a[1];

        // 出力
        System.out.println(result);
        sc.close();
    }
} import java.util.*; util.* java public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a1 = Integer.parseInt(sc.next());
        int a2 = Integer.parseInt(sc.next());
        int a3 = Integer.parseInt(sc.next());

        // 主処理
        int[] a = new int[] { a1, a2, a3 };
        Arrays.sort(a);

        int result = 0;
        result += a[1] - a[0];
        result += a[2] - a[1];

        // 出力
        System.out.println(result);
        sc.close();
    }
} Main public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a1 = Integer.parseInt(sc.next());
        int a2 = Integer.parseInt(sc.next());
        int a3 = Integer.parseInt(sc.next());

        // 主処理
        int[] a = new int[] { a1, a2, a3 };
        Arrays.sort(a);

        int result = 0;
        result += a[1] - a[0];
        result += a[2] - a[1];

        // 出力
        System.out.println(result);
        sc.close();
    } main {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a1 = Integer.parseInt(sc.next());
        int a2 = Integer.parseInt(sc.next());
        int a3 = Integer.parseInt(sc.next());

        // 主処理
        int[] a = new int[] { a1, a2, a3 };
        Arrays.sort(a);

        int result = 0;
        result += a[1] - a[0];
        result += a[2] - a[1];

        // 出力
        System.out.println(result);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a1 = Integer.parseInt(sc.next()); a1 Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int a2 = Integer.parseInt(sc.next()); a2 Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int a3 = Integer.parseInt(sc.next()); a3 Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] a = new int[] { a1, a2, a3 }; a new int[] { a1, a2, a3 } Arrays.sort(a) Arrays.sort Arrays a int result = 0; result 0 result += a[1] - a[0] result a[1] - a[0] a[1] a 1 a[0] a 0 result += a[2] - a[1] result a[2] - a[1] a[2] a 2 a[1] a 1 System.out.println(result) System.out.println System.out System System.out result sc.close() sc.close sc String args[] args public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a1 = Integer.parseInt(sc.next());
        int a2 = Integer.parseInt(sc.next());
        int a3 = Integer.parseInt(sc.next());

        // 主処理
        int[] a = new int[] { a1, a2, a3 };
        Arrays.sort(a);

        int result = 0;
        result += a[1] - a[0];
        result += a[2] - a[1];

        // 出力
        System.out.println(result);
        sc.close();
    }
} public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a1 = Integer.parseInt(sc.next());
        int a2 = Integer.parseInt(sc.next());
        int a3 = Integer.parseInt(sc.next());

        // 主処理
        int[] a = new int[] { a1, a2, a3 };
        Arrays.sort(a);

        int result = 0;
        result += a[1] - a[0];
        result += a[2] - a[1];

        // 出力
        System.out.println(result);
        sc.close();
    }
} Main
import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a1 = Integer.parseInt(sc.next());
        int a2 = Integer.parseInt(sc.next());
        int a3 = Integer.parseInt(sc.next());

        // 主処理
        int[] a = new int[] { a1, a2, a3 };
        Arrays.sort(a);

        int result = 0;
        result += a[1] - a[0];
        result += a[2] - a[1];

        // 出力
        System.out.println(result);
        sc.close();
    }
}
