import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
//
//        int a = 11;
//        int b = 5;
//        int c = 5;
        Scanner cin = new Scanner(System.in);
        int a = cin.nextInt();
        int b = cin.nextInt();
        int c = cin.nextInt();

        int res = 0;
        int cost1 = Math.abs(b-a)+Math.abs(c-b);
        res = cost1;
        int cost2 = Math.abs(c-a)+Math.abs(b-c);
        if (cost2<res) res =cost2;
        int cost3 = Math.abs(c-b)+Math.abs(a-c);
        if (cost3<res) res = cost3;
        int cost4 = Math.abs(a-b)+Math.abs(c-a);
        if (cost4<res) res = cost4;
        int cost5 = Math.abs(a-c)+Math.abs(b-a);
        if (cost5<res) res = cost5;
        int cost6 = Math.abs(b-c)+Math.abs(a-b);
        if (cost6<res) res = cost6;

        System.out.println(res);

    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
//
//        int a = 11;
//        int b = 5;
//        int c = 5;
        Scanner cin = new Scanner(System.in);
        int a = cin.nextInt();
        int b = cin.nextInt();
        int c = cin.nextInt();

        int res = 0;
        int cost1 = Math.abs(b-a)+Math.abs(c-b);
        res = cost1;
        int cost2 = Math.abs(c-a)+Math.abs(b-c);
        if (cost2<res) res =cost2;
        int cost3 = Math.abs(c-b)+Math.abs(a-c);
        if (cost3<res) res = cost3;
        int cost4 = Math.abs(a-b)+Math.abs(c-a);
        if (cost4<res) res = cost4;
        int cost5 = Math.abs(a-c)+Math.abs(b-a);
        if (cost5<res) res = cost5;
        int cost6 = Math.abs(b-c)+Math.abs(a-b);
        if (cost6<res) res = cost6;

        System.out.println(res);

    }

} Main public static void main(String[] args) {
//
//        int a = 11;
//        int b = 5;
//        int c = 5;
        Scanner cin = new Scanner(System.in);
        int a = cin.nextInt();
        int b = cin.nextInt();
        int c = cin.nextInt();

        int res = 0;
        int cost1 = Math.abs(b-a)+Math.abs(c-b);
        res = cost1;
        int cost2 = Math.abs(c-a)+Math.abs(b-c);
        if (cost2<res) res =cost2;
        int cost3 = Math.abs(c-b)+Math.abs(a-c);
        if (cost3<res) res = cost3;
        int cost4 = Math.abs(a-b)+Math.abs(c-a);
        if (cost4<res) res = cost4;
        int cost5 = Math.abs(a-c)+Math.abs(b-a);
        if (cost5<res) res = cost5;
        int cost6 = Math.abs(b-c)+Math.abs(a-b);
        if (cost6<res) res = cost6;

        System.out.println(res);

    } main {
//
//        int a = 11;
//        int b = 5;
//        int c = 5;
        Scanner cin = new Scanner(System.in);
        int a = cin.nextInt();
        int b = cin.nextInt();
        int c = cin.nextInt();

        int res = 0;
        int cost1 = Math.abs(b-a)+Math.abs(c-b);
        res = cost1;
        int cost2 = Math.abs(c-a)+Math.abs(b-c);
        if (cost2<res) res =cost2;
        int cost3 = Math.abs(c-b)+Math.abs(a-c);
        if (cost3<res) res = cost3;
        int cost4 = Math.abs(a-b)+Math.abs(c-a);
        if (cost4<res) res = cost4;
        int cost5 = Math.abs(a-c)+Math.abs(b-a);
        if (cost5<res) res = cost5;
        int cost6 = Math.abs(b-c)+Math.abs(a-b);
        if (cost6<res) res = cost6;

        System.out.println(res);

    } Scanner cin = new Scanner(System.in); cin new Scanner(System.in) int a = cin.nextInt(); a cin.nextInt() cin.nextInt cin int b = cin.nextInt(); b cin.nextInt() cin.nextInt cin int c = cin.nextInt(); c cin.nextInt() cin.nextInt cin int res = 0; res 0 int cost1 = Math.abs(b-a)+Math.abs(c-b); cost1 Math.abs(b-a)+Math.abs(c-b) Math.abs(b-a) Math.abs Math b-a b a Math.abs(c-b) Math.abs Math c-b c b res = cost1 res cost1 int cost2 = Math.abs(c-a)+Math.abs(b-c); cost2 Math.abs(c-a)+Math.abs(b-c) Math.abs(c-a) Math.abs Math c-a c a Math.abs(b-c) Math.abs Math b-c b c if (cost2<res) res =cost2; cost2<res cost2 res res =cost2 res cost2 int cost3 = Math.abs(c-b)+Math.abs(a-c); cost3 Math.abs(c-b)+Math.abs(a-c) Math.abs(c-b) Math.abs Math c-b c b Math.abs(a-c) Math.abs Math a-c a c if (cost3<res) res = cost3; cost3<res cost3 res res = cost3 res cost3 int cost4 = Math.abs(a-b)+Math.abs(c-a); cost4 Math.abs(a-b)+Math.abs(c-a) Math.abs(a-b) Math.abs Math a-b a b Math.abs(c-a) Math.abs Math c-a c a if (cost4<res) res = cost4; cost4<res cost4 res res = cost4 res cost4 int cost5 = Math.abs(a-c)+Math.abs(b-a); cost5 Math.abs(a-c)+Math.abs(b-a) Math.abs(a-c) Math.abs Math a-c a c Math.abs(b-a) Math.abs Math b-a b a if (cost5<res) res = cost5; cost5<res cost5 res res = cost5 res cost5 int cost6 = Math.abs(b-c)+Math.abs(a-b); cost6 Math.abs(b-c)+Math.abs(a-b) Math.abs(b-c) Math.abs Math b-c b c Math.abs(a-b) Math.abs Math a-b a b if (cost6<res) res = cost6; cost6<res cost6 res res = cost6 res cost6 System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {

    public static void main(String[] args) {
//
//        int a = 11;
//        int b = 5;
//        int c = 5;
        Scanner cin = new Scanner(System.in);
        int a = cin.nextInt();
        int b = cin.nextInt();
        int c = cin.nextInt();

        int res = 0;
        int cost1 = Math.abs(b-a)+Math.abs(c-b);
        res = cost1;
        int cost2 = Math.abs(c-a)+Math.abs(b-c);
        if (cost2<res) res =cost2;
        int cost3 = Math.abs(c-b)+Math.abs(a-c);
        if (cost3<res) res = cost3;
        int cost4 = Math.abs(a-b)+Math.abs(c-a);
        if (cost4<res) res = cost4;
        int cost5 = Math.abs(a-c)+Math.abs(b-a);
        if (cost5<res) res = cost5;
        int cost6 = Math.abs(b-c)+Math.abs(a-b);
        if (cost6<res) res = cost6;

        System.out.println(res);

    }

} public class Main {

    public static void main(String[] args) {
//
//        int a = 11;
//        int b = 5;
//        int c = 5;
        Scanner cin = new Scanner(System.in);
        int a = cin.nextInt();
        int b = cin.nextInt();
        int c = cin.nextInt();

        int res = 0;
        int cost1 = Math.abs(b-a)+Math.abs(c-b);
        res = cost1;
        int cost2 = Math.abs(c-a)+Math.abs(b-c);
        if (cost2<res) res =cost2;
        int cost3 = Math.abs(c-b)+Math.abs(a-c);
        if (cost3<res) res = cost3;
        int cost4 = Math.abs(a-b)+Math.abs(c-a);
        if (cost4<res) res = cost4;
        int cost5 = Math.abs(a-c)+Math.abs(b-a);
        if (cost5<res) res = cost5;
        int cost6 = Math.abs(b-c)+Math.abs(a-b);
        if (cost6<res) res = cost6;

        System.out.println(res);

    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
//
//        int a = 11;
//        int b = 5;
//        int c = 5;
        Scanner cin = new Scanner(System.in);
        int a = cin.nextInt();
        int b = cin.nextInt();
        int c = cin.nextInt();

        int res = 0;
        int cost1 = Math.abs(b-a)+Math.abs(c-b);
        res = cost1;
        int cost2 = Math.abs(c-a)+Math.abs(b-c);
        if (cost2<res) res =cost2;
        int cost3 = Math.abs(c-b)+Math.abs(a-c);
        if (cost3<res) res = cost3;
        int cost4 = Math.abs(a-b)+Math.abs(c-a);
        if (cost4<res) res = cost4;
        int cost5 = Math.abs(a-c)+Math.abs(b-a);
        if (cost5<res) res = cost5;
        int cost6 = Math.abs(b-c)+Math.abs(a-b);
        if (cost6<res) res = cost6;

        System.out.println(res);

    }

}