import java.util.*;

public class Main {
	public static void main(String[] args) {  
  		Scanner sc = new Scanner(System.in);
      	int[] ary = new int[3];
      	for(int i = 0; i < ary.length; i++) {
        	ary[i] = sc.nextInt();
        }
      	Arrays.sort(ary);
      	System.out.println(
          (ary[1] - ary[0]) + (ary[2] - ary[1]));
    }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {  
  		Scanner sc = new Scanner(System.in);
      	int[] ary = new int[3];
      	for(int i = 0; i < ary.length; i++) {
        	ary[i] = sc.nextInt();
        }
      	Arrays.sort(ary);
      	System.out.println(
          (ary[1] - ary[0]) + (ary[2] - ary[1]));
    }
} Main public static void main(String[] args) {  
  		Scanner sc = new Scanner(System.in);
      	int[] ary = new int[3];
      	for(int i = 0; i < ary.length; i++) {
        	ary[i] = sc.nextInt();
        }
      	Arrays.sort(ary);
      	System.out.println(
          (ary[1] - ary[0]) + (ary[2] - ary[1]));
    } main {  
  		Scanner sc = new Scanner(System.in);
      	int[] ary = new int[3];
      	for(int i = 0; i < ary.length; i++) {
        	ary[i] = sc.nextInt();
        }
      	Arrays.sort(ary);
      	System.out.println(
          (ary[1] - ary[0]) + (ary[2] - ary[1]));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] ary = new int[3]; ary new int[3] 3 for(int i = 0; i < ary.length; i++) {
        	ary[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < ary.length i ary.length ary ary.length i++ i++ i {
        	ary[i] = sc.nextInt();
        } {
        	ary[i] = sc.nextInt();
        } ary[i] = sc.nextInt() ary[i] ary i sc.nextInt() sc.nextInt sc Arrays.sort(ary) Arrays.sort Arrays ary System.out.println(
          (ary[1] - ary[0]) + (ary[2] - ary[1])) System.out.println System.out System System.out (ary[1] - ary[0]) + (ary[2] - ary[1]) (ary[1] - ary[0]) ary[1] ary 1 ary[0] ary 0 (ary[2] - ary[1]) ary[2] ary 2 ary[1] ary 1 String[] args args public class Main {
	public static void main(String[] args) {  
  		Scanner sc = new Scanner(System.in);
      	int[] ary = new int[3];
      	for(int i = 0; i < ary.length; i++) {
        	ary[i] = sc.nextInt();
        }
      	Arrays.sort(ary);
      	System.out.println(
          (ary[1] - ary[0]) + (ary[2] - ary[1]));
    }
} public class Main {
	public static void main(String[] args) {  
  		Scanner sc = new Scanner(System.in);
      	int[] ary = new int[3];
      	for(int i = 0; i < ary.length; i++) {
        	ary[i] = sc.nextInt();
        }
      	Arrays.sort(ary);
      	System.out.println(
          (ary[1] - ary[0]) + (ary[2] - ary[1]));
    }
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {  
  		Scanner sc = new Scanner(System.in);
      	int[] ary = new int[3];
      	for(int i = 0; i < ary.length; i++) {
        	ary[i] = sc.nextInt();
        }
      	Arrays.sort(ary);
      	System.out.println(
          (ary[1] - ary[0]) + (ary[2] - ary[1]));
    }
}