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();
	int max = Math.max(Math.max(A,B),C);
	int min = Math.min(Math.min(A,B),C);
    int m = A+B+C-max-min;

    System.out.println((m-min)+(max-m));
    }
} 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();
	int max = Math.max(Math.max(A,B),C);
	int min = Math.min(Math.min(A,B),C);
    int m = A+B+C-max-min;

    System.out.println((m-min)+(max-m));
    }
} 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();
	int max = Math.max(Math.max(A,B),C);
	int min = Math.min(Math.min(A,B),C);
    int m = A+B+C-max-min;

    System.out.println((m-min)+(max-m));
    } main {
    
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
	int max = Math.max(Math.max(A,B),C);
	int min = Math.min(Math.min(A,B),C);
    int m = A+B+C-max-min;

    System.out.println((m-min)+(max-m));
    } 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 max = Math.max(Math.max(A,B),C); max Math.max(Math.max(A,B),C) Math.max Math Math.max(A,B) Math.max Math A B C int min = Math.min(Math.min(A,B),C); min Math.min(Math.min(A,B),C) Math.min Math Math.min(A,B) Math.min Math A B C int m = A+B+C-max-min; m A+B+C-max-min A+B+C-max-min A+B+C A+B+C A B C max min System.out.println((m-min)+(max-m)) System.out.println System.out System System.out (m-min)+(max-m) (m-min) m min (max-m) max m 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();
	int max = Math.max(Math.max(A,B),C);
	int min = Math.min(Math.min(A,B),C);
    int m = A+B+C-max-min;

    System.out.println((m-min)+(max-m));
    }
} 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();
	int max = Math.max(Math.max(A,B),C);
	int min = Math.min(Math.min(A,B),C);
    int m = A+B+C-max-min;

    System.out.println((m-min)+(max-m));
    }
} 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();
	int max = Math.max(Math.max(A,B),C);
	int min = Math.min(Math.min(A,B),C);
    int m = A+B+C-max-min;

    System.out.println((m-min)+(max-m));
    }
}