import java.util.*;

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

public class Main {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int[] aa = {scanner.nextInt(),scanner.nextInt(),scanner.nextInt()};
        
        Arrays.sort(aa);
        System.out.print((aa[2] - aa[1]) + (aa[1] - aa[0]));
    }
}
