import java.util.*;

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

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