import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();

        Integer[] num = {a,b,c};
        Arrays.sort(num,Collections.reverseOrder());

        System.out.println(Math.abs(num[1]-num[0]+num[2]-num[1]));
        
        
    }

} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();

        Integer[] num = {a,b,c};
        Arrays.sort(num,Collections.reverseOrder());

        System.out.println(Math.abs(num[1]-num[0]+num[2]-num[1]));
        
        
    }

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

        Integer[] num = {a,b,c};
        Arrays.sort(num,Collections.reverseOrder());

        System.out.println(Math.abs(num[1]-num[0]+num[2]-num[1]));
        
        
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();

        Integer[] num = {a,b,c};
        Arrays.sort(num,Collections.reverseOrder());

        System.out.println(Math.abs(num[1]-num[0]+num[2]-num[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 Integer[] num = {a,b,c}; num {a,b,c} a b c Arrays.sort(num,Collections.reverseOrder()) Arrays.sort Arrays num Collections.reverseOrder() Collections.reverseOrder Collections System.out.println(Math.abs(num[1]-num[0]+num[2]-num[1])) System.out.println System.out System System.out Math.abs(num[1]-num[0]+num[2]-num[1]) Math.abs Math num[1]-num[0]+num[2]-num[1] num[1]-num[0]+num[2] num[1]-num[0] num[1] num 1 num[0] num 0 num[2] num 2 num[1] num 1 String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();

        Integer[] num = {a,b,c};
        Arrays.sort(num,Collections.reverseOrder());

        System.out.println(Math.abs(num[1]-num[0]+num[2]-num[1]));
        
        
    }

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

        Integer[] num = {a,b,c};
        Arrays.sort(num,Collections.reverseOrder());

        System.out.println(Math.abs(num[1]-num[0]+num[2]-num[1]));
        
        
    }

} Main
import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();

        Integer[] num = {a,b,c};
        Arrays.sort(num,Collections.reverseOrder());

        System.out.println(Math.abs(num[1]-num[0]+num[2]-num[1]));
        
        
    }

}
