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[] si = {Math.abs(A-B),Math.abs(C-B),Math.abs(A-C)};
   Arrays.sort(si);
   
   System.out.println(si[0]+si[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();
   
   int[] si = {Math.abs(A-B),Math.abs(C-B),Math.abs(A-C)};
   Arrays.sort(si);
   
   System.out.println(si[0]+si[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();
   
   int[] si = {Math.abs(A-B),Math.abs(C-B),Math.abs(A-C)};
   Arrays.sort(si);
   
   System.out.println(si[0]+si[1]);
 } main {
   Scanner sc = new Scanner(System.in);
   int A = sc.nextInt();
   int B = sc.nextInt();
   int C = sc.nextInt();
   
   int[] si = {Math.abs(A-B),Math.abs(C-B),Math.abs(A-C)};
   Arrays.sort(si);
   
   System.out.println(si[0]+si[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[] si = {Math.abs(A-B),Math.abs(C-B),Math.abs(A-C)}; si {Math.abs(A-B),Math.abs(C-B),Math.abs(A-C)} Math.abs(A-B) Math.abs Math A-B A B Math.abs(C-B) Math.abs Math C-B C B Math.abs(A-C) Math.abs Math A-C A C Arrays.sort(si) Arrays.sort Arrays si System.out.println(si[0]+si[1]) System.out.println System.out System System.out si[0]+si[1] si[0] si 0 si[1] si 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();
   
   int[] si = {Math.abs(A-B),Math.abs(C-B),Math.abs(A-C)};
   Arrays.sort(si);
   
   System.out.println(si[0]+si[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();
   
   int[] si = {Math.abs(A-B),Math.abs(C-B),Math.abs(A-C)};
   Arrays.sort(si);
   
   System.out.println(si[0]+si[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();
   
   int[] si = {Math.abs(A-B),Math.abs(C-B),Math.abs(A-C)};
   Arrays.sort(si);
   
   System.out.println(si[0]+si[1]);
 }
}