import java.util.Arrays;
import java.util.Scanner;

/**
 *
 * @author must
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        
        int A[] = new int[3];
        A[0] = sc.nextInt();
        A[1] = sc.nextInt();
        A[2] = sc.nextInt();
        
        Arrays.sort(A);
        
        int sum = 0;
        sum = Math.abs(A[1]-A[0]);
        sum += Math.abs(A[2]-A[1]);
        
        System.out.println(sum);
        
    }
    
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        
        int A[] = new int[3];
        A[0] = sc.nextInt();
        A[1] = sc.nextInt();
        A[2] = sc.nextInt();
        
        Arrays.sort(A);
        
        int sum = 0;
        sum = Math.abs(A[1]-A[0]);
        sum += Math.abs(A[2]-A[1]);
        
        System.out.println(sum);
        
    }
    
} Main /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        
        int A[] = new int[3];
        A[0] = sc.nextInt();
        A[1] = sc.nextInt();
        A[2] = sc.nextInt();
        
        Arrays.sort(A);
        
        int sum = 0;
        sum = Math.abs(A[1]-A[0]);
        sum += Math.abs(A[2]-A[1]);
        
        System.out.println(sum);
        
    } main {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        
        int A[] = new int[3];
        A[0] = sc.nextInt();
        A[1] = sc.nextInt();
        A[2] = sc.nextInt();
        
        Arrays.sort(A);
        
        int sum = 0;
        sum = Math.abs(A[1]-A[0]);
        sum += Math.abs(A[2]-A[1]);
        
        System.out.println(sum);
        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A[] = new int[3]; A new int[3] 3 A[0] = sc.nextInt() A[0] A 0 sc.nextInt() sc.nextInt sc A[1] = sc.nextInt() A[1] A 1 sc.nextInt() sc.nextInt sc A[2] = sc.nextInt() A[2] A 2 sc.nextInt() sc.nextInt sc Arrays.sort(A) Arrays.sort Arrays A int sum = 0; sum 0 sum = Math.abs(A[1]-A[0]) sum Math.abs(A[1]-A[0]) Math.abs Math A[1]-A[0] A[1] A 1 A[0] A 0 sum += Math.abs(A[2]-A[1]) sum Math.abs(A[2]-A[1]) Math.abs Math A[2]-A[1] A[2] A 2 A[1] A 1 System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        
        int A[] = new int[3];
        A[0] = sc.nextInt();
        A[1] = sc.nextInt();
        A[2] = sc.nextInt();
        
        Arrays.sort(A);
        
        int sum = 0;
        sum = Math.abs(A[1]-A[0]);
        sum += Math.abs(A[2]-A[1]);
        
        System.out.println(sum);
        
    }
    
} public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        
        int A[] = new int[3];
        A[0] = sc.nextInt();
        A[1] = sc.nextInt();
        A[2] = sc.nextInt();
        
        Arrays.sort(A);
        
        int sum = 0;
        sum = Math.abs(A[1]-A[0]);
        sum += Math.abs(A[2]-A[1]);
        
        System.out.println(sum);
        
    }
    
} Main
import java.util.Arrays;
import java.util.Scanner;

/**
 *
 * @author must
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        
        int A[] = new int[3];
        A[0] = sc.nextInt();
        A[1] = sc.nextInt();
        A[2] = sc.nextInt();
        
        Arrays.sort(A);
        
        int sum = 0;
        sum = Math.abs(A[1]-A[0]);
        sum += Math.abs(A[2]-A[1]);
        
        System.out.println(sum);
        
    }
    
}
