import java.util.*;

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

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