import java.util.*;

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

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