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);

    }

}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz